Interface OAuth2AuthorizationGrant
- All Known Implementing Classes:
OAuth2ClientCredentialsGrant
,OAuth2ResourceOwnerPasswordCredentialsGrant
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@UnstableApi @FunctionalInterface public interface OAuth2AuthorizationGrant
Represents an OAuth 2.0 Access Token Grant flow to obtain Access Token.
-
Method Summary
Modifier and Type Method Description CompletionStage<GrantedOAuth2AccessToken>
getAccessToken()
Produces OAuth 2.0 Access Tokendefault CompletionStage<HttpRequest>
withAuthorization(HttpRequest req)
Produces (if necessary) OAuth 2.0 Access Token and adds it to thereq
in form of theAuthorization
header.
-
Method Details
-
getAccessToken
CompletionStage<GrantedOAuth2AccessToken> getAccessToken()Produces OAuth 2.0 Access Token -
withAuthorization
Produces (if necessary) OAuth 2.0 Access Token and adds it to thereq
in form of theAuthorization
header.- Parameters:
req
-HttpRequest
to wrap with OAuth 2.0 authorization.- Returns:
CompletionStage
that refers toHttpRequest
wrapped wrap with OAuth 2.0 authorization information.
-