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(org.apache.cxf.jaxrs.ext.MessageContext mc, jakarta.ws.rs.core.MultivaluedMap<String, String> params, UserSubject subject, OAuthRedirectionState secData) Create a new session token and stores itprotected org.apache.cxf.rs.security.jose.jwe.JweDecryptionProviderprotected org.apache.cxf.rs.security.jose.jwe.JweEncryptionProviderprotected org.apache.cxf.rs.security.jose.jws.JwsSignatureProviderprotected org.apache.cxf.rs.security.jose.jws.JwsSignatureVerifiergetSessionState(org.apache.cxf.jaxrs.ext.MessageContext messageContext, String sessionToken, UserSubject subject) Expand the session tokengetSessionToken(org.apache.cxf.jaxrs.ext.MessageContext mc, jakarta.ws.rs.core.MultivaluedMap<String, String> params, UserSubject subject) Retrieve the stored session tokenremoveSessionToken(org.apache.cxf.jaxrs.ext.MessageContext mc, jakarta.ws.rs.core.MultivaluedMap<String, String> params, UserSubject subject) Remove the stored session tokenvoidsetJweDecryptor(org.apache.cxf.rs.security.jose.jwe.JweDecryptionProvider jweDecryptor) voidsetJweEncryptor(org.apache.cxf.rs.security.jose.jwe.JweEncryptionProvider jweEncryptor) voidsetJweRequired(boolean jweRequired) voidsetJwsProvider(org.apache.cxf.rs.security.jose.jws.JwsSignatureProvider jwsProvider) voidsetJwsRequired(boolean jwsRequired) voidsetJwsVerifier(org.apache.cxf.rs.security.jose.jws.JwsSignatureVerifier jwsVerifier) voidsetMaxDefaultSessionInterval(int maxDefaultSessionInterval)
-
Constructor Details
-
JoseSessionTokenProvider
public JoseSessionTokenProvider()
-
-
Method Details
-
createSessionToken
public String createSessionToken(org.apache.cxf.jaxrs.ext.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(org.apache.cxf.jaxrs.ext.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(org.apache.cxf.jaxrs.ext.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(org.apache.cxf.jaxrs.ext.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
public void setJwsProvider(org.apache.cxf.rs.security.jose.jws.JwsSignatureProvider jwsProvider) -
setJwsVerifier
public void setJwsVerifier(org.apache.cxf.rs.security.jose.jws.JwsSignatureVerifier jwsVerifier) -
setJweEncryptor
public void setJweEncryptor(org.apache.cxf.rs.security.jose.jwe.JweEncryptionProvider jweEncryptor) -
setJweDecryptor
public void setJweDecryptor(org.apache.cxf.rs.security.jose.jwe.JweDecryptionProvider jweDecryptor) -
getInitializedSigProvider
protected org.apache.cxf.rs.security.jose.jws.JwsSignatureProvider getInitializedSigProvider() -
getInitializedEncryptionProvider
protected org.apache.cxf.rs.security.jose.jwe.JweEncryptionProvider getInitializedEncryptionProvider() -
setJwsRequired
public void setJwsRequired(boolean jwsRequired) -
setJweRequired
public void setJweRequired(boolean jweRequired) -
getInitializedDecryptionProvider
protected org.apache.cxf.rs.security.jose.jwe.JweDecryptionProvider getInitializedDecryptionProvider() -
getInitializedSigVerifier
protected org.apache.cxf.rs.security.jose.jws.JwsSignatureVerifier getInitializedSigVerifier() -
convertStateToString
-
setMaxDefaultSessionInterval
public void setMaxDefaultSessionInterval(int maxDefaultSessionInterval)
-