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/26 00:25:06 UTC
[jclouds-labs-google] At the cost of one trivial type adapter, remove
lots of junk with google auto (#67)
Traded 500 lines of junk for <100 line TokenAdapter.
You can merge this Pull Request by running:
git pull https://github.com/adriancole/jclouds-labs-google adrian.decruft-oauth-with-auto
Or you can view, comment on it, or merge it online at:
https://github.com/jclouds/jclouds-labs-google/pull/67
-- Commit Summary --
* At the cost of one trivial type adapter, remove lots of junk with google auto.
-- File Changes --
M google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/config/GoogleCloudStorageParserModule.java (6)
M google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/config/GoogleComputeEngineParserModule.java (3)
M oauth/pom.xml (6)
M oauth/src/main/java/org/jclouds/oauth/v2/OAuthApi.java (1)
M oauth/src/main/java/org/jclouds/oauth/v2/OAuthApiMetadata.java (6)
M oauth/src/main/java/org/jclouds/oauth/v2/config/OAuthModule.java (41)
M oauth/src/main/java/org/jclouds/oauth/v2/domain/ClaimSet.java (173)
M oauth/src/main/java/org/jclouds/oauth/v2/domain/Header.java (108)
M oauth/src/main/java/org/jclouds/oauth/v2/domain/Token.java (133)
M oauth/src/main/java/org/jclouds/oauth/v2/domain/TokenRequest.java (116)
M oauth/src/main/java/org/jclouds/oauth/v2/domain/TokenRequestFormat.java (2)
M oauth/src/main/java/org/jclouds/oauth/v2/filters/OAuthAuthenticator.java (2)
M oauth/src/main/java/org/jclouds/oauth/v2/functions/BuildTokenRequest.java (37)
M oauth/src/main/java/org/jclouds/oauth/v2/json/ClaimSetTypeAdapter.java (31)
M oauth/src/main/java/org/jclouds/oauth/v2/json/HeaderTypeAdapter.java (24)
M oauth/src/main/java/org/jclouds/oauth/v2/json/JWTTokenRequestFormat.java (19)
A oauth/src/main/java/org/jclouds/oauth/v2/json/TokenAdapter.java (66)
D oauth/src/main/resources/META-INF/services/org.jclouds.apis.ApiMetadata (18)
M oauth/src/test/java/org/jclouds/oauth/v2/features/OAuthApiExpectTest.java (20)
M oauth/src/test/java/org/jclouds/oauth/v2/features/OAuthApiLiveTest.java (10)
M oauth/src/test/java/org/jclouds/oauth/v2/internal/BaseOAuthAuthenticatedApiLiveTest.java (13)
M oauth/src/test/java/org/jclouds/oauth/v2/json/JWTTokenRequestFormatTest.java (9)
M oauth/src/test/java/org/jclouds/oauth/v2/parse/ParseTokenTest.java (9)
-- Patch Links --
https://github.com/jclouds/jclouds-labs-google/pull/67.patch
https://github.com/jclouds/jclouds-labs-google/pull/67.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67
Re: [jclouds-labs-google] At the cost of fiddling with type hierarchy
adapters, remove lots of junk with google auto (#67)
Posted by Adrian Cole <no...@github.com>.
ok. ready to review. I'm done fiddling :)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67#issuecomment-60504404
Re: [jclouds-labs-google] At the cost of fiddling with type hierarchy
adapters, remove lots of junk with google auto (#67)
Posted by Chris Custine <no...@github.com>.
+1 I haven't tested with WIP such as the DO v2 API but the code looks good. After seeing some of this Autovalue stuff, I am going to switch the DO v2 provider to use it ASAP :-)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67#issuecomment-60615645
Re: [jclouds-labs-google] At the cost of fiddling with type hierarchy
adapters, remove lots of junk with google auto (#67)
Posted by Adrian Cole <no...@github.com>.
cherry-picked into master, 1.8.x
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67#issuecomment-60622812
Re: [jclouds-labs-google] At the cost of fiddling with type hierarchy
adapters, remove lots of junk with google auto (#67)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-google-pull-requests #186](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/186/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67#issuecomment-60504304
Re: [jclouds-labs-google] At the cost of fiddling with type hierarchy
adapters, remove lots of junk with google auto (#67)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-google #1554](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1554/) 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/67#issuecomment-60502200
Re: [jclouds-labs-google] At the cost of fiddling with type hierarchy
adapters, remove lots of junk with google auto (#67)
Posted by Adrian Cole <no...@github.com>.
Closed #67.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67#event-184165194
Re: [jclouds-labs-google] At the cost of fiddling with type hierarchy
adapters, remove lots of junk with google auto (#67)
Posted by Adrian Cole <no...@github.com>.
> +import org.jclouds.oauth.v2.domain.ClaimSet;
> +import org.jclouds.oauth.v2.domain.Header;
> +import org.jclouds.oauth.v2.domain.Token;
> +
> +import com.google.common.collect.ImmutableSet;
> +import com.google.gson.Gson;
> +import com.google.gson.TypeAdapter;
> +import com.google.gson.TypeAdapterFactory;
> +import com.google.gson.reflect.TypeToken;
> +import com.google.gson.stream.JsonReader;
> +import com.google.gson.stream.JsonWriter;
> +import com.google.inject.AbstractModule;
> +import com.google.inject.Provides;
> +
> +/** Configures type adapter factories for {@link Header}, {@link ClaimSet}, and {@link Token}. */
> +public final class OAuthParserModule extends AbstractModule {
Note this is very good form for auth apis such as oauth and keystone. locking in serialization here allows any of the dozens of things that use it to adjust serialization preferences without concern for how that impacts auth.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67/files#r19382476
Re: [jclouds-labs-google] At the cost of fiddling with type hierarchy
adapters, remove lots of junk with google auto (#67)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-google-pull-requests #185](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/185/) SUCCESS
This pull request looks good
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67#issuecomment-60502122
Re: [jclouds-labs-google] At the cost of one trivial type adapter,
remove lots of junk with google auto (#67)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-google-pull-requests #184](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/184/) FAILURE
Looks like there's a problem with this pull request
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67#issuecomment-60499630
Re: [jclouds-labs-google] At the cost of one trivial type adapter,
remove lots of junk with google auto (#67)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-google #1553](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1553/) FAILURE
Looks like there's a problem with this pull request
[(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/67#issuecomment-60499697
Re: [jclouds-labs-google] At the cost of one trivial type adapter,
remove lots of junk with google auto (#67)
Posted by Adrian Cole <no...@github.com>.
ps auth is unnecessarily complex code. will fix that up after.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67#issuecomment-60500804
Re: [jclouds-labs-google] At the cost of fiddling with type hierarchy
adapters, remove lots of junk with google auto (#67)
Posted by Adrian Cole <no...@github.com>.
@jdaggett if you don't mind giving a quick review, I can showcase json in google storage.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67#issuecomment-60525721
Re: [jclouds-labs-google] At the cost of one trivial type adapter,
remove lots of junk with google auto (#67)
Posted by Adrian Cole <no...@github.com>.
oops.. working on this
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67#issuecomment-60500798
Re: [jclouds-labs-google] At the cost of one trivial type adapter,
remove lots of junk with google auto (#67)
Posted by CloudBees pull request builder plugin <no...@github.com>.
[jclouds-labs-google-pull-requests #183](https://jclouds.ci.cloudbees.com/job/jclouds-labs-google-pull-requests/183/) FAILURE
Looks like there's a problem with this pull request
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67#issuecomment-60499629
Re: [jclouds-labs-google] At the cost of fiddling with type hierarchy
adapters, remove lots of junk with google auto (#67)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-google #1555](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1555/) 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/67#issuecomment-60504360
Re: [jclouds-labs-google] At the cost of fiddling with type hierarchy
adapters, remove lots of junk with google auto (#67)
Posted by Adrian Cole <no...@github.com>.
@gk5885 @eamonnmcmanus @cgruber fyi, another several hundred lines saved thanks to auto.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/67#issuecomment-60667576
Re: [jclouds-labs-google] At the cost of one trivial type adapter,
remove lots of junk with google auto (#67)
Posted by BuildHive <no...@github.com>.
[jclouds » jclouds-labs-google #1552](https://buildhive.cloudbees.com/job/jclouds/job/jclouds-labs-google/1552/) FAILURE
Looks like there's a problem with this pull request
[(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/67#issuecomment-60499653