Type | Name and description |
---|---|
java.lang.String |
CALLBACK_ATTR |
org.codehaus.groovy.grails.commons.GrailsApplication |
grailsApplication |
RestOauthService |
restOauthService |
Constructor and description |
---|
RestOauthController
() |
Type | Name and description |
---|---|
java.lang.Object |
authenticate(java.lang.String provider, java.lang.String callback) Starts the OAuth authentication flow, redirecting to the provider's Login URL. |
java.lang.Object |
callback(java.lang.String provider) Handles the OAuth provider callback. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Starts the OAuth authentication flow, redirecting to the provider's Login URL. An optional callback parameter allows the frontend application to define the frontend callback URL on demand.
Handles the OAuth provider callback. It uses RestOauthService to generate and store a token for that user, and finally redirects to the configured frontend callback URL, where the token is in the URL. That way, the frontend application can store the REST API token locally for subsequent API calls.
Groovy Documentation