The implementation of this interface is capable of performing of the user authorization defined in the OAuth2 specification as "Authorization Code Grant Flow" (OAuth 2 spec defines more Authorization Flows). The result of the authorization is the {@link TokenResult}. The implementation starts the authorization process by construction of a redirect URI to which the user should be redirected (the URI points to authorization consent page hosted by Service Provider). The user grants an access using this page. Service Provider redirects the user back to the our server and the authorization process is finished using the same instance of the interface implementation.
To perform the authorization follow these steps:
Important note: one instance of the interface can be used only for one authorization process. The methods must be called exactly in the order specified by the list above. Therefore the instance is also not thread safe and no concurrent access is expected.
Instance must be stored between method calls (between {@code start} and {@code finish}) for one user authorization process as the instance keeps internal state of the authorization process.
@author Miroslav Fuksa (miroslav.fuksa at oracle.com) @since 2.3
|
|
|
|
|
|