WAS v8.5 > Develop applications > Develop web services - Security (WS-Security) > Develop applications that use Web Services Security > Develop message-level security for JAX-WS web services > Use Web Services Security SPIs

Create custom security tokens for Web services security using the GenericSecurityTokenFactory SPIs

Use the GenericSecurityTokenFactory SPIs to create custom security tokens for use by the WS-Security runtime. These security tokens can be used for, but are not be limited to, WSSAPIs, JAAS login modules, and custom security tokens.

The GenericSecurityTokenFactory provides several SPIs to create custom tokens that can be emitted with the GenericIssuedTokenGenerateLoginModule or as a custom token.

A custom security token that is created with the GenericSecurityTokenFactory is the complete form of a security token that can be emitted by the WS-Security run time. We do not have to write an emitter or receiver, such as writeExternal or readExternal, for the token you create using these SPIs. Only two pieces of information are required:

In the following steps, the custom token being created is a UsernameToken. This token is was selected as the custom token to create because it is a well-known form, and has a good mix of elements, sub-elements, and attributes. To determine the methods you need to use to build our own custom tokens, look at the XML for a UsernameToken, and match it up with what is being done in the methods included in one of the following steps.


Related


Create fully-populated username tokens for Web services security for use by Generic Issue Login Modules
Generate and Consuming custom tokens with the Generic Issue Login Modules


+

Search Tips   |   Advanced Search