mirror of https://github.com/apache/jclouds.git
JCLOUDS-633: Support passing bearer token directly for OAuth2
This commit is contained in:
parent
8df2b40742
commit
520432903e
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
package org.jclouds.googlecloudstorage.config;
|
||||
|
||||
import org.jclouds.oauth.v2.config.CredentialType;
|
||||
import org.jclouds.oauth.v2.config.OAuthModule;
|
||||
import org.jclouds.oauth.v2.domain.OAuthCredentials;
|
||||
import org.jclouds.oauth.v2.domain.Token;
|
||||
|
@ -45,5 +46,6 @@ public class OAuthModuleWithoutTypeAdapters extends OAuthModule {
|
|||
}).to(BuildTokenRequest.class);
|
||||
bind(new TypeLiteral<Function<TokenRequest, Token>>() {
|
||||
}).to(FetchToken.class);
|
||||
bind(CredentialType.class).toProvider(OAuthModule.CredentialTypeFromPropertyOrDefault.class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ import org.jclouds.googlecloudstorage.handlers.BucketAccessControlsBinder;
|
|||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
import org.jclouds.oauth.v2.config.OAuthScopes;
|
||||
import org.jclouds.oauth.v2.filters.OAuthAuthenticator;
|
||||
import org.jclouds.oauth.v2.filters.OAuthAuthenticationFilter;
|
||||
import org.jclouds.rest.annotations.BinderParam;
|
||||
import org.jclouds.rest.annotations.Fallback;
|
||||
import org.jclouds.rest.annotations.MapBinder;
|
||||
|
@ -53,7 +53,7 @@ import org.jclouds.rest.binders.BindToJsonPayload;
|
|||
*/
|
||||
|
||||
@SkipEncoding({ '/', '=' })
|
||||
@RequestFilters(OAuthAuthenticator.class)
|
||||
@RequestFilters(OAuthAuthenticationFilter.class)
|
||||
public interface BucketAccessControlsApi {
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,7 +43,7 @@ import org.jclouds.googlecloudstorage.options.ListOptions;
|
|||
import org.jclouds.googlecloudstorage.options.UpdateBucketOptions;
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
import org.jclouds.oauth.v2.config.OAuthScopes;
|
||||
import org.jclouds.oauth.v2.filters.OAuthAuthenticator;
|
||||
import org.jclouds.oauth.v2.filters.OAuthAuthenticationFilter;
|
||||
import org.jclouds.rest.annotations.BinderParam;
|
||||
import org.jclouds.rest.annotations.Fallback;
|
||||
import org.jclouds.rest.annotations.MapBinder;
|
||||
|
@ -60,7 +60,7 @@ import org.jclouds.rest.binders.BindToJsonPayload;
|
|||
*/
|
||||
|
||||
@SkipEncoding({ '/', '=' })
|
||||
@RequestFilters(OAuthAuthenticator.class)
|
||||
@RequestFilters(OAuthAuthenticationFilter.class)
|
||||
public interface BucketApi {
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,7 +39,7 @@ import org.jclouds.googlecloudstorage.handlers.DefaultObjectAccessControlsBinder
|
|||
import org.jclouds.http.HttpResponse;
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
import org.jclouds.oauth.v2.config.OAuthScopes;
|
||||
import org.jclouds.oauth.v2.filters.OAuthAuthenticator;
|
||||
import org.jclouds.oauth.v2.filters.OAuthAuthenticationFilter;
|
||||
import org.jclouds.rest.annotations.BinderParam;
|
||||
import org.jclouds.rest.annotations.Fallback;
|
||||
import org.jclouds.rest.annotations.MapBinder;
|
||||
|
@ -56,7 +56,7 @@ import org.jclouds.rest.binders.BindToJsonPayload;
|
|||
*/
|
||||
|
||||
@SkipEncoding({ '/', '=' })
|
||||
@RequestFilters(OAuthAuthenticator.class)
|
||||
@RequestFilters(OAuthAuthenticationFilter.class)
|
||||
public interface DefaultObjectAccessControlsApi {
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue