Class JoseSessionTokenProvider
java.lang.Object
org.apache.cxf.rs.security.oauth2.provider.JoseSessionTokenProvider
- All Implemented Interfaces:
SessionAuthenticityTokenProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcreateSessionToken(MessageContext mc, jakarta.ws.rs.core.MultivaluedMap<String, String> params, UserSubject subject, OAuthRedirectionState secData) Create a new session token and stores itprotected JweDecryptionProviderprotected JweEncryptionProviderprotected JwsSignatureProviderprotected JwsSignatureVerifiergetSessionState(MessageContext messageContext, String sessionToken, UserSubject subject) Expand the session tokengetSessionToken(MessageContext mc, jakarta.ws.rs.core.MultivaluedMap<String, String> params, UserSubject subject) Retrieve the stored session tokenremoveSessionToken(MessageContext mc, jakarta.ws.rs.core.MultivaluedMap<String, String> params, UserSubject subject) Remove the stored session tokenvoidsetJweDecryptor(JweDecryptionProvider jweDecryptor) voidsetJweEncryptor(JweEncryptionProvider jweEncryptor) voidsetJweRequired(boolean jweRequired) voidsetJwsProvider(JwsSignatureProvider jwsProvider) voidsetJwsRequired(boolean jwsRequired) voidsetJwsVerifier(JwsSignatureVerifier jwsVerifier) voidsetMaxDefaultSessionInterval(int maxDefaultSessionInterval)
-
Constructor Details
-
JoseSessionTokenProvider
public JoseSessionTokenProvider()
-
-
Method Details
-
createSessionToken
public String createSessionToken(MessageContext mc, jakarta.ws.rs.core.MultivaluedMap<String, String> params, UserSubject subject, OAuthRedirectionState secData) Description copied from interface:SessionAuthenticityTokenProviderCreate a new session token and stores it- Specified by:
createSessionTokenin interfaceSessionAuthenticityTokenProvider- Parameters:
mc- theMessageContextof this requestparams- redirection-based grant request parameterssubject- authenticated end user- Returns:
- the created session token
-
getSessionToken
public String getSessionToken(MessageContext mc, jakarta.ws.rs.core.MultivaluedMap<String, String> params, UserSubject subject) Description copied from interface:SessionAuthenticityTokenProviderRetrieve the stored session token- Specified by:
getSessionTokenin interfaceSessionAuthenticityTokenProvider- Parameters:
mc- theMessageContextof this requestparams- grant authorization parameterssubject- authenticated end user- Returns:
- the stored token
-
removeSessionToken
public String removeSessionToken(MessageContext mc, jakarta.ws.rs.core.MultivaluedMap<String, String> params, UserSubject subject) Description copied from interface:SessionAuthenticityTokenProviderRemove the stored session token- Specified by:
removeSessionTokenin interfaceSessionAuthenticityTokenProvider- Parameters:
mc- theMessageContextof this requestparams- grant authorization parameterssubject- authenticated end user
-
getSessionState
public OAuthRedirectionState getSessionState(MessageContext messageContext, String sessionToken, UserSubject subject) Description copied from interface:SessionAuthenticityTokenProviderExpand the session token- Specified by:
getSessionStatein interfaceSessionAuthenticityTokenProvider- Parameters:
messageContext- theMessageContextof this requestsessionToken- the tokensubject- authenticated end user- Returns:
- the expanded token or null
-
setJwsProvider
-
setJwsVerifier
-
setJweEncryptor
-
setJweDecryptor
-
getInitializedSigProvider
-
getInitializedEncryptionProvider
-
setJwsRequired
public void setJwsRequired(boolean jwsRequired) -
setJweRequired
public void setJweRequired(boolean jweRequired) -
getInitializedDecryptionProvider
-
getInitializedSigVerifier
-
convertStateToString
-
setMaxDefaultSessionInterval
public void setMaxDefaultSessionInterval(int maxDefaultSessionInterval)
-