diff --git a/oauth-plugin/CHANGES.txt b/oauth-plugin/CHANGES.txt index 09bde0f..db02ed4 100644 --- a/oauth-plugin/CHANGES.txt +++ b/oauth-plugin/CHANGES.txt @@ -1,14 +1,13 @@ Potential improvements: -- Wiki pages on how to use new scope config property. -- Wiki pages on how to fork and contibute etc. -- Removal of net.oauth dependency. +- README.txt file. - Turn OAuth service into stateless session bean to improve performance. --- Will need to stop storing auth URLs locally for controller. Release notes 0.4 (TBA) +- Removal of net.oauth library dependency. -Release notes 0.3 (1st July 2010) +Release notes 0.3 (1st July, 2010) - Update to Grails 1.3.2. - Introduction to BuildConfig.groovy. @@ -26,7 +25,7 @@ Release notes 0.1.1 - Patch for LinkedIn -Release notes 0.1 +Release notes 0.1 (30th May, 2008) - Initial release. diff --git a/oauth-plugin/grails-app/conf/BuildConfig.groovy b/oauth-plugin/grails-app/conf/BuildConfig.groovy index efdca3c..89b4524 100644 --- a/oauth-plugin/grails-app/conf/BuildConfig.groovy +++ b/oauth-plugin/grails-app/conf/BuildConfig.groovy @@ -13,7 +13,7 @@ grails.project.dependency.resolution = { } dependencies { - runtime 'net.oauth:oauth-core:20090531' + //runtime 'net.oauth:oauth-core:20090531' runtime 'oauth.signpost:signpost-core:1.2' } diff --git a/oauth-plugin/grails-app/services/org/grails/plugins/oauth/OauthService.groovy b/oauth-plugin/grails-app/services/org/grails/plugins/oauth/OauthService.groovy index baf73f3..58a22c7 100644 --- a/oauth-plugin/grails-app/services/org/grails/plugins/oauth/OauthService.groovy +++ b/oauth-plugin/grails-app/services/org/grails/plugins/oauth/OauthService.groovy @@ -148,7 +148,7 @@ class OauthService implements InitializingBean { * @param consumerName the consumer to fetch request token from. * @return A map containing the token key, secret and authorisation URL. */ - def fetchRequestToken(consumerName) { + def fetchRequestToken(final def consumerName) { log.debug "Fetching request token for ${consumerName}" try { @@ -165,7 +165,7 @@ class OauthService implements InitializingBean { [key: consumer?.getToken(), secret: consumer?.getTokenSecret()] } catch (Exception ex) { - final def errorMessage = "Unable to fetch request token: consumerName = $consumerName" + final def errorMessage = "Unable to fetch request token (consumerName=$consumerName)" log.error(errorMessage, ex) throw new OauthServiceException(errorMessage, ex) @@ -182,7 +182,7 @@ class OauthService implements InitializingBean { * @return The URL to redirect the user to for authorisation. */ @Deprecated - def getAuthUrl(key, consumerName, params) { + def getAuthUrl(final def key, final def consumerName, final def params) { log.debug "Fetching authorisation URL for $consumerName" authUrls[consumerName] @@ -193,7 +193,7 @@ class OauthService implements InitializingBean { * * @return A map containing the access token and secret. */ - def fetchAccessToken(consumerName, requestToken) { + def fetchAccessToken(final def consumerName, final def requestToken) { log.debug "Going to exchange for access token" try { @@ -239,7 +239,9 @@ class OauthService implements InitializingBean { * @param params any request parameters. * @return the response from the server. */ - def accessResource(url, consumer, token, method = 'GET', params = null) { + def accessResource(final def url, final def consumer, final def token, + final def method = 'GET', final def params = null) { + accessResource(url: url, consumer: consumer, token: token, method: method, params: params) } @@ -249,7 +251,7 @@ class OauthService implements InitializingBean { * @param args access resource arguments. * @return the response from the server. */ - def accessResource(Map args) { + def accessResource(final def Map args) { log.debug "Attempt to access protected resource" // Declare request parameters @@ -325,7 +327,7 @@ class OauthService implements InitializingBean { * @param consumerName the consumer name. * @return the consumer instance by name. */ - def getConsumer(consumerName) { + def getConsumer(final def consumerName) { consumers[consumerName] } @@ -335,7 +337,7 @@ class OauthService implements InitializingBean { * @param consumerName the consumer name. * @return the provider instance by name. */ - def getProvider(consumerName) { + def getProvider(final def consumerName) { providers[consumerName] } @@ -345,7 +347,7 @@ class OauthService implements InitializingBean { * @param consumerName the consumer name. * @return the authorisational URL instance by consumer name. */ - def getAuthUrl(consumerName) { + def getAuthUrl(final def consumerName) { log.debug "Fetching authorisation URL for $consumerName" authUrls[consumerName] diff --git a/oauth-plugin/web-app/images/google-oath-screenshot.jpg b/oauth-plugin/web-app/images/google-oath-screenshot.jpg new file mode 100644 index 0000000..47a55e3 Binary files /dev/null and b/oauth-plugin/web-app/images/google-oath-screenshot.jpg differ