org.jclouds.oauth.v2
Interface OAuthApi

All Superinterfaces:
Closeable

public interface OAuthApi
extends Closeable

Provides access to OAuth via REST api.

Usually this is not directly used by a client, which instead specifies OAuthAuthenticator as a request filter, which in turn uses this class to perform token requests.

Author:
David Alves
See Also:
OAuthAsyncApi

Method Summary
 Token authenticate(TokenRequest tokenRequest)
          Authenticates/Authorizes access to a resource defined in TokenRequest against an OAuth v2 authentication/authorization server.
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

authenticate

@Named(value="authenticate")
Token authenticate(TokenRequest tokenRequest)
                   throws org.jclouds.rest.AuthorizationException
Authenticates/Authorizes access to a resource defined in TokenRequest against an OAuth v2 authentication/authorization server.

Parameters:
tokenRequest - specified the principal and the required permissions
Returns:
a Token object with the token required to access the resource along with its expiration time
Throws:
org.jclouds.rest.AuthorizationException - if the principal cannot be authenticated or has no permissions for the specifed resources.


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.