Package com.ocient.auth

# Class OpenIDAuthenticators

java.lang.Object
com.ocient.auth.OpenIDAuthenticators

    public class OpenIDAuthenticators
    extends Object

## Nested Class Summary

Nested Classes
Modifier and Type | Class | Description
--- | --- | ---
`static class` | `OpenIDAuthenticators.AuthorizationCodeCallbackResource` |
`static class` | `OpenIDAuthenticators.AuthorizationCodeWithPKCEClient` | The PKCE-enhanced Authorization Code Flow introduces a secret created by the calling application that can be verified by the authorization server; this secret is called the Code Verifier.
`static class` | `OpenIDAuthenticators.DeviceAuthorizationGrant<T extends Token>` | The Device Authorization Grant is an extension that enables devices with no browser or limited input capability to use OAuth.

`static class`

`OpenIDAuthenticators.DeviceAuthorizationGrantClient`

From https://datatracker.ietf.org/doc/html/rfc8628 The OAuth 2.0 device authorization grant is designed for Internet-connected devices that either lack a browser to perform a user-agent-based authorization or are input constrained to the extent that requiring the user to input text in order to authenticate during the authorization flow is impractical.

`static class` | `OpenIDAuthenticators.OAuthFlow` |
`static class` | `OpenIDAuthenticators.OAuthToken` | Token(s) received from an OAuth 2.0 Token Endpoint
`static interface` | `OpenIDAuthenticators.TokenPoller<T extends Token>` |

## Field Summary

Fields
Modifier and Type | Field | Description
--- | --- | ---
`static int` | `DEFAULT_CODE_CALLBACK_PORT` |
`static String` | `DISCOVERY_DOCUMENT_PATH` |
`static com.google.gson.Gson` | `GSON` |
`static String` | `OAUTH_DEVICE_GRANT` |
`static String` | `OAUTH_PKCE` |

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`OpenIDAuthenticators()` |

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`protected static org.apache.http.impl.client.CloseableHttpClient` | `createHTTPClient​(String url)` |
`static com.google.gson.JsonObject` | `getDiscoveryDocument​(String issuer)` | Returns the issuer's discovery document

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

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

## Field Details

### GSON

public static final com.google.gson.Gson GSON

### DISCOVERY_DOCUMENT_PATH

public static final String DISCOVERY_DOCUMENT_PATH

See Also:
  Constant Field Values

### DEFAULT_CODE_CALLBACK_PORT

public static final int DEFAULT_CODE_CALLBACK_PORT

See Also:
  Constant Field Values

### OAUTH_DEVICE_GRANT

public static final String OAUTH_DEVICE_GRANT

See Also:
  Constant Field Values

### OAUTH_PKCE

public static final String OAUTH_PKCE

See Also:
  Constant Field Values

## Constructor Details

### OpenIDAuthenticators

public OpenIDAuthenticators()

## Method Details

### getDiscoveryDocument

public static com.google.gson.JsonObject getDiscoveryDocument​(String issuer) throws Exception
Returns the issuer's discovery document

Parameters:
  `issuer` - the Authorization Server
Returns:
  the issuer's discovery document
Throws:
  `Exception` - when any exception occurs

### createHTTPClient

protected static org.apache.http.impl.client.CloseableHttpClient createHTTPClient​(String url) throws Exception

Throws:
  `Exception`