Package io.trino.server.security.oauth2
Class OAuth2Service
java.lang.Object
io.trino.server.security.oauth2.OAuth2Service
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOAuth2Service(OAuth2Client client, io.jsonwebtoken.SigningKeyResolver signingKeyResolver, io.airlift.http.client.HttpClient httpClient, OAuth2Config oauth2Config, OAuth2TokenHandler tokenHandler, Optional<OAuth2WebUiInstalled> webUiOAuthEnabled) -
Method Summary
Modifier and TypeMethodDescriptionconvertTokenToClaims(String token) javax.ws.rs.core.ResponsegetCallbackErrorHtml(String errorCode) getInternalFailureHtml(String errorMessage) javax.ws.rs.core.ResponsehandleOAuth2Error(String state, String error, String errorDescription, String errorUri) static Stringjavax.ws.rs.core.ResponsestartOAuth2Challenge(URI callbackUri, String handlerState) javax.ws.rs.core.ResponsestartOAuth2Challenge(javax.ws.rs.core.UriInfo uriInfo) javax.ws.rs.core.ResponsestartOAuth2Challenge(javax.ws.rs.core.UriInfo uriInfo, String handlerState)
-
Field Details
-
REDIRECT_URI
- See Also:
-
STATE
- See Also:
-
NONCE
- See Also:
-
OPENID_SCOPE
- See Also:
-
HANDLER_STATE_CLAIM
- See Also:
-
-
Constructor Details
-
OAuth2Service
@Inject public OAuth2Service(OAuth2Client client, io.jsonwebtoken.SigningKeyResolver signingKeyResolver, io.airlift.http.client.HttpClient httpClient, OAuth2Config oauth2Config, OAuth2TokenHandler tokenHandler, Optional<OAuth2WebUiInstalled> webUiOAuthEnabled) throws IOException - Throws:
IOException
-
-
Method Details
-
startOAuth2Challenge
public javax.ws.rs.core.Response startOAuth2Challenge(javax.ws.rs.core.UriInfo uriInfo) -
startOAuth2Challenge
public javax.ws.rs.core.Response startOAuth2Challenge(javax.ws.rs.core.UriInfo uriInfo, String handlerState) -
startOAuth2Challenge
-
handleOAuth2Error
-
finishOAuth2Challenge
-
convertTokenToClaims
public Optional<Map<String,Object>> convertTokenToClaims(String token) throws ChallengeFailedException - Throws:
ChallengeFailedException
-
getSuccessHtml
-
getCallbackErrorHtml
-
getInternalFailureHtml
-
hashNonce
-