Skip to content

Commit

Permalink
Move client creation to dev environment only (failed in testing)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluesliverx committed Oct 7, 2011
1 parent 372c9d5 commit bfd2aba
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions grails-app/conf/BootStrap.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ class BootStrap {
def clientDetailsService

def init = { servletContext ->
// Add client to oauth provider
def client = new BaseClientDetails()
client.clientId = "clientId"
client.clientSecret = "clientSecret"
client.authorizedGrantTypes = ["authorization_code", "refresh_token", "client_credentials"]
clientDetailsService.clientDetailsStore = [
"clientId":client
]
if (Environment.current == Environment.DEVELOPMENT) {
// Add client to oauth provider only in dev env
def client = new BaseClientDetails()
client.clientId = "clientId"
client.clientSecret = "clientSecret"
client.authorizedGrantTypes = ["authorization_code", "refresh_token", "client_credentials"]
clientDetailsService.clientDetailsStore = [
"clientId":client
]
}
}
def destroy = {
}
Expand Down

0 comments on commit bfd2aba

Please sign in to comment.