public class AuthenticationHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected List<org.cipango.client.AuthenticationHelper.AuthenticationHolder> |
_authentications |
protected List<Credentials> |
_credentials |
static String |
AUTH_HELPER
Attribute of a
SipServletRequest which holds the
AuthenticationHelper instance used to handle it. |
static String |
AUTHENTICATED_REQUEST
Attribute of the authenticated
SipServletRequest which holds
the original request. |
static String |
ORIGINAL_REQUEST
Attribute of the original
SipServletRequest which holds the
authenticated request created from it. |
| Constructor and Description |
|---|
AuthenticationHelper(List<Credentials> credentials) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAuthentication(javax.servlet.sip.SipServletRequest request) |
javax.servlet.sip.SipServletRequest |
getAuthenticatedRequest(javax.servlet.sip.SipServletRequest request)
Returns the authenticated request built from
request. |
Credentials |
getCredentials(String realm) |
javax.servlet.sip.SipServletRequest |
getOriginalRequest(javax.servlet.sip.SipServletRequest request)
Returns the original request from which
request was built. |
boolean |
handleChallenge(javax.servlet.sip.SipServletResponse response) |
public static final String ORIGINAL_REQUEST
SipServletRequest which holds the
authenticated request created from it.public static final String AUTHENTICATED_REQUEST
SipServletRequest which holds
the original request.public static final String AUTH_HELPER
SipServletRequest which holds the
AuthenticationHelper instance used to handle it.protected List<org.cipango.client.AuthenticationHelper.AuthenticationHolder> _authentications
protected List<Credentials> _credentials
public AuthenticationHelper(List<Credentials> credentials)
public Credentials getCredentials(String realm)
public javax.servlet.sip.SipServletRequest getOriginalRequest(javax.servlet.sip.SipServletRequest request)
request was built.request - a potentially authenticated request.request if it was not built from another one.ORIGINAL_REQUESTpublic javax.servlet.sip.SipServletRequest getAuthenticatedRequest(javax.servlet.sip.SipServletRequest request)
request.request - request,
or request if none was found.AUTHENTICATED_REQUESTpublic boolean handleChallenge(javax.servlet.sip.SipServletResponse response)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletExceptionpublic void addAuthentication(javax.servlet.sip.SipServletRequest request)
throws javax.servlet.ServletException
javax.servlet.ServletExceptionCopyright © 2014. All Rights Reserved.