Package com.ocient.auth

# Class OpenIDAuthenticators.AuthorizationCodeWithPKCEClient.AuthorizationCodeGrant<T extends Token>

java.lang.Object
com.ocient.auth.OpenIDAuthenticators.AuthorizationCodeWithPKCEClient.AuthorizationCodeGrant<T>

Type Parameters:
  `T` - The `Token` response type

Enclosing class:
  OpenIDAuthenticators.AuthorizationCodeWithPKCEClient

    public static class OpenIDAuthenticators.AuthorizationCodeWithPKCEClient.AuthorizationCodeGrant<T extends Token>
    extends Object

The authorization code is obtained by using an authorization server as an intermediary between the client and resource owner. Instead of requesting authorization directly from the resource owner, the client directs the resource owner to an authorization server (via its user-agent as defined in [RFC2616]), which in turn directs the resource owner back to the client with the authorization code.

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`AuthorizationCodeGrant​(String authorizationURL, CompletableFuture<T> tokenFuture)` |

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`CompletableFuture<T>` | `getToken()` |
`String` | `getURL()` |

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AuthorizationCodeGrant

public AuthorizationCodeGrant​(String authorizationURL, CompletableFuture<T> tokenFuture)

## Method Details

### getURL

public String getURL()

Returns:
  qualified URL for the request to the Authorization Server's /authorize endpoint.

### getToken

public CompletableFuture<T> getToken()

Returns:
  a future that completes when the user has completed the authorization request