Package com.ocient.auth
Class OktaAuthenticators.OktaNativeSSOToken
java.lang.Object
com.ocient.auth.OpenIDAuthenticators.OAuthToken
com.ocient.auth.OktaAuthenticators.OktaNativeSSOToken
- All Implemented Interfaces:
Token
- Enclosing class:
- OktaAuthenticators
public static class OktaAuthenticators.OktaNativeSSOToken extends OpenIDAuthenticators.OAuthToken
From https://developer.okta.com/docs/guides/configure-native-sso/main
Native SSO allows you to protect native OpenID Connect applications, such as
desktop apps and mobile apps, and achieve Single Sign-On (SSO) and Single
Logout (SLO) between these applications. SSO between browser-based web
applications is achieved by leveraging shared cookies. Unlike web
applications, native applications can't use web cookies. Okta offers a
token-based approach to achieve SSO between native applications. See OpenID
Connect and OAuth 2.0 API for more information on the OAuth 2.0 and OpenID
Connect endpoints.
-
Constructor Summary
Constructors Constructor Description OktaNativeSSOToken(ClientWireProtocol.OpenIDAuthenticator authenticator, com.google.gson.JsonObject tokenResponse) -
Method Summary
Modifier and Type Method Description static OktaAuthenticators.OktaNativeSSOTokendecrypt(byte[] passphrase, InputStream input)Decrypts theOktaAuthenticators.OktaNativeSSOTokenusing the secret providedbyte[]encrypt(byte[] passphrase)Encrypts theOktaAuthenticators.OktaNativeSSOTokenStringgetToken()StringgetTokenHint()
-
Constructor Details
-
OktaNativeSSOToken
public OktaNativeSSOToken(ClientWireProtocol.OpenIDAuthenticator authenticator, com.google.gson.JsonObject tokenResponse)
-
-
Method Details
-
getTokenHint
- Specified by:
getTokenHintin interfaceToken- Overrides:
getTokenHintin classOpenIDAuthenticators.OAuthToken- Returns:
- the token hint to forward to the database
-
getToken
- Specified by:
getTokenin interfaceToken- Overrides:
getTokenin classOpenIDAuthenticators.OAuthToken- Returns:
- the token payload
-
encrypt
public byte[] encrypt(byte[] passphrase) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, IOException, InvalidKeySpecException, InvalidAlgorithmParameterException, com.nimbusds.jose.JOSEExceptionEncrypts theOktaAuthenticators.OktaNativeSSOToken- Parameters:
passphrase-- Throws:
InvalidKeyExceptionNoSuchAlgorithmExceptionNoSuchPaddingExceptionIllegalBlockSizeExceptionBadPaddingExceptionIOExceptionInvalidKeySpecExceptionInvalidAlgorithmParameterExceptioncom.nimbusds.jose.JOSEException
-
decrypt
public static OktaAuthenticators.OktaNativeSSOToken decrypt(byte[] passphrase, InputStream input) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, IOException, AuthException, ParseException, com.nimbusds.jose.JOSEExceptionDecrypts theOktaAuthenticators.OktaNativeSSOTokenusing the secret provided- Parameters:
passphrase-input-- Returns:
- Throws:
InvalidKeyExceptionNoSuchAlgorithmExceptionNoSuchPaddingExceptionIllegalBlockSizeExceptionBadPaddingExceptionIOExceptionAuthExceptionParseExceptioncom.nimbusds.jose.JOSEException
-