You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Ignasi Barrera <no...@github.com> on 2016/04/07 01:46:57 UTC

[jclouds/jclouds] Fixed OAuth authentication flow injections (#943)

Changes how OAuth authentication flows are injected. Since different flows require different context properties, we can't eagerly create all flow classes because users will only bind to the context the properties relevant to the authentication for the current credential type.

This PR changes the current approach of declaring the properties as optional in each flow to let the OAuthModule lazily load only the right flow. This way we eliminate the need for optional injections and allow every flow to properly configure their properties.

It also provides an OAuthScopes implementation to properly designate the absence of scopes.

/cc @jmspring
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/943

-- Commit Summary --

  * Fixed OAuth authentication flow injections

-- File Changes --

    M apis/oauth/src/main/java/org/jclouds/oauth/v2/config/OAuthModule.java (29)
    M apis/oauth/src/main/java/org/jclouds/oauth/v2/config/OAuthScopes.java (13)
    M apis/oauth/src/main/java/org/jclouds/oauth/v2/filters/ClientCredentialsSecretFlow.java (16)
    M apis/oauth/src/main/java/org/jclouds/oauth/v2/filters/JWTBearerTokenFlow.java (20)
    A apis/oauth/src/test/java/org/jclouds/oauth/v2/filters/TestJWTBearerTokenFlow.java (42)
    M providers/google-compute-engine/pom.xml (7)
    M providers/google-compute-engine/src/test/java/org/jclouds/googlecomputeengine/internal/GoogleComputeEngineTestModule.java (3)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/943.patch
https://github.com/jclouds/jclouds/pull/943.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/943

Re: [jclouds/jclouds] Fixed OAuth authentication flow injections (#943)

Posted by Ignasi Barrera <no...@github.com>.
Closed #943.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/943#event-618024402

Re: [jclouds/jclouds] Fixed OAuth authentication flow injections (#943)

Posted by Ignasi Barrera <no...@github.com>.
Squashed and pushed to master as [819141a6](http://git-wip-us.apache.org/repos/asf/jclouds/commit/819141a6).

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/943#issuecomment-206760770