Interface | Description |
---|---|
OAuthResourceDefs |
Class | Description |
---|---|
AccessTokenClientResource |
Client resource used to acquire an OAuth token.
|
AccessTokenServerResource |
Server resource used to acquire an OAuth token.
|
AuthorizationBaseServerResource |
Base Restlet resource class for Authorization service resource.
Handle errors according to OAuth2.0 specification, and manage AuthSession. |
AuthorizationServerResource |
Restlet implementation class AuthorizationService.
|
AuthPageServerResource |
Helper class to the AuhorizationResource Handles Authorization requests.
|
ClientVerifier |
Verifier for OAuth 2.0 Token Endpoints.
Verify incoming requests with client credentials. |
FacebookAccessTokenClientResource |
Client resource used to acquire an Facebook OAuth token.
|
HttpOAuthHelper |
Implementation of OAuth2 Authentication.
|
HttpOAuthMacHelper |
Implementation of the client-side OAuth2 support.
If this helper is not automatically added to the Engine.getInstance() , add it with: |
OAuthParameters |
Gathers OAuth credentials.
|
OAuthProxy |
A restlet filter for initiating a web server flow or comparable to OAuth 2.0
3-legged authorization.
|
OAuthServerResource |
Base class for common resources used by the OAuth server side.
|
ProtectedClientResource |
Client resource that is able to complete any request with credentials.
|
TokenAuthServerResource |
Token "Authenticate" Resource for internal use.
Supports the OAuthResourceDefs.TOKEN_TYPE_BEARER token type only. |
TokenVerifier |
Verifier for OAuth 2.0 Protected Resources
Typically use with ChallengeAuthenticator. |
Enum | Description |
---|---|
GrantType |
Supported mechanisms to grant tokens.
|
OAuthError |
Utility class for formating OAuth errors
|
ResponseType |
Defines the supported types of responses to a grant request.
|
Exception | Description |
---|---|
OAuthException |
Exception that represents OAuth 2.0 (RFC6749) Errors.
|
{ @code public Restlet createInboundRoot(){ ... OAuthAuthorizer auth = new OAuthAuthorizer( "http://localhost:8080/OAuth2Provider/validate"); auth.setNext(ProtectedResource.class); router.attach("/me", auth); ... } }
Example 1. Creating a Protected Resource
{ @code OAuthParameter params = new OAuthParameters("clientId", "clientSecret", oauthURL, "scope1 scope2"); OAuthProxy proxy = new OauthProxy(params, getContext(), true); proxy.setNext(DummyResource.class); router.attach("/write", write); //A Slightly more advanced example that also sets some SSL client parameters Client client = new Client(Protocol.HTTPS); Context c = new Context(); client.setContext(c); c.getParameters().add("truststorePath", "pathToKeyStoreFile"); c.getParameters(0.add("truststorePassword", "password"); OAuthParameter params = new OAuthParameters("clientId", "clientSecret", oauthURL, "scope1 scope2"); OAuthProxy proxy = new OauthProxy(params, getContext(), true, client); proxy.setNext(DummyResource.class); router.attach("/write", write); }
Example 2. Creating a Proxies to access protected resources
Copyright © 2005-2015 Restlet.