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
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
ConstructorsConstructorDescriptionOktaNativeSSOToken(ClientWireProtocol.OpenIDAuthenticator authenticator, com.google.gson.JsonObject tokenResponse) -
Method Summary
Modifier and TypeMethodDescriptiondecrypt(byte[] passphrase, InputStream input) Decrypts theOktaAuthenticators.OktaNativeSSOTokenusing the secret providedbyte[]encrypt(byte[] passphrase) Encrypts theOktaAuthenticators.OktaNativeSSOTokengetToken()Methods inherited from class com.ocient.auth.OpenIDAuthenticators.OAuthToken
getTokenResponse
-
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.JOSEException Encrypts 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.JOSEException Decrypts theOktaAuthenticators.OktaNativeSSOTokenusing the secret provided- Parameters:
passphrase-input-- Returns:
- Throws:
InvalidKeyExceptionNoSuchAlgorithmExceptionNoSuchPaddingExceptionIllegalBlockSizeExceptionBadPaddingExceptionIOExceptionAuthExceptionParseExceptioncom.nimbusds.jose.JOSEException
-