public class UsernameTokenGenerator extends java.lang.Object implements TokenGeneratorComponent
UsernameToken object and stores in in the Subject
of the current thread.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CHECK_CACHE_UNT |
STANDALONE| Constructor and Description |
|---|
UsernameTokenGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
init(java.util.Map map)
Initializes this generator with a
TokenGeneratorConfig object which is passed
in by the map parameter. |
void |
invoke(org.w3c.dom.Document doc,
org.w3c.dom.Element parent,
java.util.Map context)
Generates a new username token in a SOAP message and sets the token in the
Subject
of the current thread. |
public static final java.lang.String CHECK_CACHE_UNT
public void init(java.util.Map map)
throws SoapSecurityException
TokenGeneratorConfig object which is passed
in by the map parameter.init in interface com.ibm.ws.webservices.wssecurity.WSSComponentinit in interface Initializablemap - A Map object which contains
name-value pairs.
These pairs includes a configuration object and
<Property> elements in the
configuration XMI files. In the map, the TokenGeneratorConfig object
is stored with a key of TokenGeneratorConfig.CONFIG_KEY.SoapSecurityException - When there is a problem initializing the generatorInitializable.init(java.util.Map),
TokenGeneratorConfigpublic void invoke(org.w3c.dom.Document doc,
org.w3c.dom.Element parent,
java.util.Map context)
throws SoapSecurityException
Subject
of the current thread.
Note that token generator processes only single token at a time,
i.e., those which matched the Token's Id and (possibly) its
reference name given by its "parent" component (that invokes
this token generator component), that are propagated throgh the
local context. The generated token is added under the parent.
invoke in interface com.ibm.ws.webservices.wssecurity.WSSGeneratorComponentdoc - The Document object that includes
a SOAP envelopeparent - The parent element that has the element to be
generatedcontext - A Map object which contains
necessary name-value pairs, such as a Subject object.SoapSecurityException - When there is a problem during generating a new
username tokenWSSGeneratorComponent.invoke(org.w3c.dom.Document, org.w3c.dom.Element, java.util.Map)