|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.twss.common.siputils.pheader.PAssertedIdentity
public class PAssertedIdentity
Utilty to add P-Asserted-Identity headers. These headers allow IMS signaling elements to assert the identity of the use on behalf of which a SIP message is created. This code follows RFC 3325. The PAssertedIdentity utility methods are used to query the security information and insert it appropriate into the headers of a request when forwarding the request to another system. Note the code to do this is something like this:
Field Summary | |
---|---|
static java.lang.String |
HEADER
The SIP header string for a P-Asserted-Identity header |
Method Summary | |
---|---|
static java.lang.String |
findPAssertedIdentityValue(java.lang.String requesterId)
Find the String-representation of the identity that should be asserted. |
static java.lang.String |
findPAssertedIdentityValue(java.lang.String requesterId,
java.lang.String assumedUriPrefix)
Find the String-representation of the identity that should be asserted. |
static javax.servlet.sip.Address |
setPAssertedIdentityHeader(java.lang.String requesterId,
javax.servlet.sip.SipServletRequest request,
javax.servlet.sip.SipFactory sipFactory)
Add the P-Asserted-Identity header to requests based on the requesterId provided by the ServiceImplContext. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HEADER
Method Detail |
---|
public static java.lang.String findPAssertedIdentityValue(java.lang.String requesterId)
requesterId
- to use to calculate the the requester ID.
Should be null, whitespace-only, or a case variation of
"UNAUTHENTICATED" to indicate no requester identity available.
Leading and trailing whitespace is ignored.a
- String representation of the P-Asserted-Identity value,
or null if such a header isn't appropriate for the request.public static java.lang.String findPAssertedIdentityValue(java.lang.String requesterId, java.lang.String assumedUriPrefix)
requesterId
- to use to calculate the the requester ID.
Should be null, whitespace-only, or a case variation of
"UNAUTHENTICATED" to indicate no requester identity available.
Leading and trailing whitespace is ignored.a
- String representation of the P-Asserted-Identity value,
or null if such a header isn't appropriate for the request.assumedUriPrefix
- Some Services may have user defined scheme's
this parameter scheme is preappened to the RequesterID
Some common schemes: "sip:" , "group:"public static javax.servlet.sip.Address setPAssertedIdentityHeader(java.lang.String requesterId, javax.servlet.sip.SipServletRequest request, javax.servlet.sip.SipFactory sipFactory) throws java.lang.NullPointerException, UnsupportedPAssertedIdentitySchemeException, PAssertedIdentityParsingException
PAssertedID-value
s in
a single header, this method will at most provide a single value.
requesterId
- to use to calculate the the requester ID.
Leading and trailing whitespace is ignored.request
- in which to set the P-Asserted-Identity header
if possible.sipFactory
- to use to construct relevant URIs.
java.lang.NullPointerException
- if request or sipFactory is null.
UnsupportedPAssertedIdentitySchemeException
- if requesterId
contains a URI from a scheme other than SIP, SIPS, or TEL.
Any existing header will have been removed prior to this
exception.
PAssertedIdentityParsingException
- if the requesterId to
PAssertedID-value
conversion goes awry. Any
existing header will have been removed prior to this exception.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |