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

Reply via email to