public abstract class WSSUtilFactory
extends java.lang.Object
This API is used for general Web Services Security utility methods for use in JAAS login modules
Constructor and Description |
---|
WSSUtilFactory() |
Modifier and Type | Method and Description |
---|---|
abstract byte[] |
decode(byte[] data)
Decode Base64 encoded data.
|
abstract byte[] |
decode(java.lang.String data)
Decode Base64 encoded data.
|
abstract java.lang.String |
digestPassword(byte[] nonce,
java.util.Date created,
char[] password)
Calculates a password digest string.
|
abstract java.lang.String |
digestPassword(java.lang.String nonce,
java.lang.String created,
char[] password)
Calculates a password digest string.
|
abstract java.lang.String |
encode(byte[] data)
Base64 encode data.
|
abstract java.util.Map |
getCallbackHandlerProperties(javax.security.auth.callback.CallbackHandler handler)
Get the property map from the callback handler.
|
abstract java.util.Map |
getCallbackHandlerProperties(java.util.Map wssContext)
Get the property map from the callback handler.
|
abstract java.util.List |
getConsumedTokens(java.util.Map WSSContext)
Gets the list of consumed tokens.
|
abstract org.w3c.dom.Element |
getDOMProcessingElement(java.util.Map wssContext)
Get the org.w3c.dom based SOAP processing element object.
|
abstract java.util.Map |
getHTTPRequestHeaders(javax.security.auth.callback.CallbackHandler handler)
Get the HTTP headers from an inbound SOAP request.
|
abstract java.util.Map |
getHTTPRequestHeaders(java.util.Map wssContext)
Get the HTTP headers from an inbound SOAP request.
|
abstract java.util.Map |
getHTTPRequestHeaders(org.apache.axis2.context.MessageContext msgContext)
Get the HTTP headers from an inbound SOAP request.
|
static WSSUtilFactory |
getInstance()
Retrieves an instance of the WSSUtilFactory.
|
abstract java.security.KeyStore |
getKeyStore(java.lang.String keyStoreRef)
Open a key store.
|
abstract java.security.KeyStore |
getKeyStore(java.lang.String storeType,
java.lang.String storePath,
char[] storePass)
Open a key store.
|
abstract org.apache.axis2.context.MessageContext |
getMessageContext(javax.security.auth.callback.CallbackHandler handler)
Get the MessageContext associated with the current request/response.
|
abstract org.apache.axis2.context.MessageContext |
getMessageContext(java.util.Map wssContext)
Get the MessageContext associated with the current request/response.
|
abstract org.apache.axiom.om.OMElement |
getProcessingElement(java.util.Map wssContext)
Get the AXIOM based SOAP processing element object.
|
abstract com.ibm.wsspi.wssecurity.core.config.TokenConsumerConfig |
getTokenConsumerConfig(java.util.Map WSSContext)
Gets the token consumer configuration object.
|
abstract com.ibm.wsspi.wssecurity.core.config.TokenGeneratorConfig |
getTokenGeneratorConfig(java.util.Map WSSContext)
Gets the token generator configuration object.
|
abstract java.util.Map |
getWSSContext(javax.security.auth.callback.CallbackHandler handler)
Get the web services security context map.
|
abstract boolean |
isServiceProvider()
Identifies if the current application is a web services provider.
|
abstract void |
setConsumedToken(java.util.Map WSSContext,
java.util.List tokens)
Sets a list consumed tokens.
|
abstract void |
setConsumedToken(java.util.Map WSSContext,
SecurityToken token)
Sets a consumed token.
|
abstract void |
setGeneratedToken(java.util.Map WSSContext,
java.util.List tokens)
Sets a list of generated tokens.
|
abstract void |
setGeneratedToken(java.util.Map WSSContext,
SecurityToken token)
Sets a generated token.
|
abstract boolean |
verifyDigestedPassword(UsernameToken unt,
char[] expectedPassword)
Verifies a digested password on a UsernameToken object.
|
public static WSSUtilFactory getInstance() throws WSSException
WSSException
- if the illegal access occurs or if the WSSFactory instance is not generated.public abstract java.lang.String encode(byte[] data)
data
- bytes to be encodedpublic abstract byte[] decode(java.lang.String data)
data
- base64 encoded stringpublic abstract byte[] decode(byte[] data)
data
- base64 encoded bytespublic abstract java.security.KeyStore getKeyStore(java.lang.String keyStoreRef) throws WSSException
keyStoreRef
- centralized keystore representationWSSException
public abstract java.security.KeyStore getKeyStore(java.lang.String storeType, java.lang.String storePath, char[] storePass) throws WSSException
storeType
- key store type (type that Java security supports, ex jks, jceks, etc)storePath
- path to key store (fully-qualified path name, or URI representation)storePass
- key store passwordWSSException
- if the key store cannot be obtainedpublic abstract java.util.Map getHTTPRequestHeaders(org.apache.axis2.context.MessageContext msgContext)
msgContext
- message contextWSSException
- if the key store cannot be obtainedpublic abstract java.util.Map getHTTPRequestHeaders(java.util.Map wssContext)
wssContext
- web services security contextpublic abstract java.util.Map getHTTPRequestHeaders(javax.security.auth.callback.CallbackHandler handler) throws WSSException
handler
- login module's callback handlerWSSException
- if the use of the handler failspublic abstract java.util.Map getWSSContext(javax.security.auth.callback.CallbackHandler handler) throws WSSException
handler
- login module's callback handlerWSSException
- if the use of the handler failspublic abstract org.apache.axis2.context.MessageContext getMessageContext(java.util.Map wssContext)
wssContext
- web services security context mappublic abstract org.apache.axis2.context.MessageContext getMessageContext(javax.security.auth.callback.CallbackHandler handler) throws WSSException
handler
- login module's callback handlerWSSException
- if the use of the handler failspublic abstract java.util.Map getCallbackHandlerProperties(java.util.Map wssContext)
wssContext
- web services security context mappublic abstract java.util.Map getCallbackHandlerProperties(javax.security.auth.callback.CallbackHandler handler) throws WSSException
handler
- login module's callback handlerWSSException
- if the use of the handler failspublic abstract org.apache.axiom.om.OMElement getProcessingElement(java.util.Map wssContext)
wssContext
- web services security context mappublic abstract org.w3c.dom.Element getDOMProcessingElement(java.util.Map wssContext)
wssContext
- web services security context mappublic abstract void setConsumedToken(java.util.Map WSSContext, SecurityToken token)
wssContext
- web services security context maptoken
- token that was consumedpublic abstract void setConsumedToken(java.util.Map WSSContext, java.util.List tokens)
wssContext
- web services security context maptokens
- list of tokens that were consumedpublic abstract void setGeneratedToken(java.util.Map WSSContext, SecurityToken token)
wssContext
- web services security context maptoken
- token that is to be generatedpublic abstract void setGeneratedToken(java.util.Map WSSContext, java.util.List tokens)
wssContext
- web services security context maptokens
- list of tokens that are to bepublic abstract java.util.List getConsumedTokens(java.util.Map WSSContext)
wssContext
- web services security context mappublic abstract com.ibm.wsspi.wssecurity.core.config.TokenConsumerConfig getTokenConsumerConfig(java.util.Map WSSContext)
wssContext
- web services security context mappublic abstract com.ibm.wsspi.wssecurity.core.config.TokenGeneratorConfig getTokenGeneratorConfig(java.util.Map WSSContext)
wssContext
- web services security context mappublic abstract boolean isServiceProvider() throws com.ibm.wsspi.wssecurity.core.SoapSecurityException
com.ibm.wsspi.wssecurity.core.SoapSecurityException
public abstract java.lang.String digestPassword(byte[] nonce, java.util.Date created, char[] password) throws javax.security.auth.login.LoginException
nonce
- UsernameToken nonce value in bytescreated
- UsernameToken created datejavax.security.auth.login.LoginException
public abstract java.lang.String digestPassword(java.lang.String nonce, java.lang.String created, char[] password) throws javax.security.auth.login.LoginException
nonce
- UsernameToken nonce value, base-64 encodedcreated
- UsernameToken created date in UTC String format (as it appears in the token XNL)javax.security.auth.login.LoginException
public abstract boolean verifyDigestedPassword(UsernameToken unt, char[] expectedPassword) throws javax.security.auth.login.LoginException
unt
- UsernameToken containing a digested passwordexpectedPassword
- Password to comparejavax.security.auth.login.LoginException