You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Adrian Cole <no...@github.com> on 2014/10/31 05:06:33 UTC

[jclouds-labs-google] Decomplicate OAuth a little. (#70)

Still more work to do. This flattens things and is me noting problems like scary singletons I need to later fix.
You can merge this Pull Request by running:

  git pull https://github.com/adriancole/jclouds-labs-google adrian-oauthcleanup

Or you can view, comment on it, or merge it online at:

  https://github.com/jclouds/jclouds-labs-google/pull/70

-- Commit Summary --

  * Decomplicate OAuth a little.

-- File Changes --

    M oauth/src/main/java/org/jclouds/oauth/v2/OAuthApi.java (7)
    R oauth/src/main/java/org/jclouds/oauth/v2/binders/OAuthTokenBinder.java (38)
    D oauth/src/main/java/org/jclouds/oauth/v2/domain/TokenRequestFormat.java (45)
    M oauth/src/main/java/org/jclouds/oauth/v2/filters/BearerTokenAuthenticator.java (20)
    M oauth/src/main/java/org/jclouds/oauth/v2/filters/OAuthAuthenticator.java (26)
    M oauth/src/main/java/org/jclouds/oauth/v2/functions/BuildTokenRequest.java (34)
    M oauth/src/main/java/org/jclouds/oauth/v2/functions/FetchToken.java (17)
    M oauth/src/main/java/org/jclouds/oauth/v2/functions/OAuthCredentialsSupplier.java (69)
    M oauth/src/main/java/org/jclouds/oauth/v2/functions/SignOrProduceMacForToken.java (51)
    M oauth/src/main/java/org/jclouds/oauth/v2/handlers/OAuthErrorHandler.java (16)
    D oauth/src/main/java/org/jclouds/oauth/v2/handlers/OAuthTokenBinder.java (45)
    D oauth/src/main/java/org/jclouds/oauth/v2/internal/SubtypeAdapterFactory.java (42)
    R oauth/src/test/java/org/jclouds/oauth/v2/binders/OAuthTokenBinderTest.java (15)

-- Patch Links --

https://github.com/jclouds/jclouds-labs-google/pull/70.patch
https://github.com/jclouds/jclouds-labs-google/pull/70.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/70

Re: [jclouds-labs-google] Decomplicate OAuth a little. (#70)

Posted by Ignasi Barrera <no...@github.com>.
Yes. In any case, if someone, for some reason, needed to extend those classes, it is pretty straightforward to bind a custom impl and use composition.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/70#issuecomment-61280920

Re: [jclouds-labs-google] Decomplicate OAuth a little. (#70)

Posted by Adrian Cole <no...@github.com>.
Effective Java states “you should make each class or member as
inaccessible as possible”. I don't want to create open-ended code, as
that basically means we are going to break people without knowing it.

The general idea is to make sure we know if someone needs to subclass
things. Marking it final forces someone to contact us, then we can
document the extension vs leaving it open ended. In the mean time,
yeah composition will work in many cases.

Make sense?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/70#issuecomment-61279405

Re: [jclouds-labs-google] Decomplicate OAuth a little. (#70)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-google-pull-requests #196](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/196/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/70#issuecomment-61214628

Re: [jclouds-labs-google] Decomplicate OAuth a little. (#70)

Posted by Ignasi Barrera <no...@github.com>.
lgtm. Just one question: why making all those classes `final`? If we want to make OAuth a general purpose API once moved to the main repository, shouldn't we allow to subclass them? Is the general idea to favor composition vs inheritance?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/70#issuecomment-61275205

Re: [jclouds-labs-google] Decomplicate OAuth a little. (#70)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-google #1597](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1597/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/70#issuecomment-61215830

Re: [jclouds-labs-google] Decomplicate OAuth a little. (#70)

Posted by Adrian Cole <no...@github.com>.
Closed #70.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/70#event-186638027

Re: [jclouds-labs-google] Decomplicate OAuth a little. (#70)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-google-pull-requests #198](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/198/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/70#issuecomment-61215011

Re: [jclouds-labs-google] Decomplicate OAuth a little. (#70)

Posted by Adrian Cole <no...@github.com>.
picked into master. when I have a spare couple hours, I'll try to sort out 1.8.x :P

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/70#issuecomment-61281558

Re: [jclouds-labs-google] Decomplicate OAuth a little. (#70)

Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-google-pull-requests #197](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/197/) SUCCESS
This pull request looks good

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/70#issuecomment-61214848

Re: [jclouds-labs-google] Decomplicate OAuth a little. (#70)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-google #1595](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1595/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/70#issuecomment-61214850

Re: [jclouds-labs-google] Decomplicate OAuth a little. (#70)

Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-google #1596](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1596/) SUCCESS
This pull request looks good
[(what's this?)](https://www.cloudbees.com/what-is-buildhive)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/70#issuecomment-61215367