Class JoseSessionTokenProvider
- java.lang.Object
-
- org.apache.cxf.rs.security.oauth2.provider.JoseSessionTokenProvider
-
- All Implemented Interfaces:
SessionAuthenticityTokenProvider
public class JoseSessionTokenProvider extends Object implements SessionAuthenticityTokenProvider
-
-
Constructor Summary
Constructors Constructor Description JoseSessionTokenProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringconvertStateToString(OAuthRedirectionState secData)StringcreateSessionToken(org.apache.cxf.jaxrs.ext.MessageContext mc, javax.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.JweDecryptionProvidergetInitializedDecryptionProvider()protected org.apache.cxf.rs.security.jose.jwe.JweEncryptionProvidergetInitializedEncryptionProvider()protected org.apache.cxf.rs.security.jose.jws.JwsSignatureProvidergetInitializedSigProvider()protected org.apache.cxf.rs.security.jose.jws.JwsSignatureVerifiergetInitializedSigVerifier()OAuthRedirectionStategetSessionState(org.apache.cxf.jaxrs.ext.MessageContext messageContext, String sessionToken, UserSubject subject)Expand the session tokenStringgetSessionToken(org.apache.cxf.jaxrs.ext.MessageContext mc, javax.ws.rs.core.MultivaluedMap<String,String> params, UserSubject subject)Retrieve the stored session tokenStringremoveSessionToken(org.apache.cxf.jaxrs.ext.MessageContext mc, javax.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)
-
-
-
Method Detail
-
createSessionToken
public String createSessionToken(org.apache.cxf.jaxrs.ext.MessageContext mc, javax.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, javax.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, javax.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
protected String convertStateToString(OAuthRedirectionState secData)
-
setMaxDefaultSessionInterval
public void setMaxDefaultSessionInterval(int maxDefaultSessionInterval)
-
-