public class AuthenticationHelperImpl extends Object implements AuthenticationHelper
| Constructor and Description |
|---|
AuthenticationHelperImpl(SIPTransactionStack sipStack,
AccountManager accountManager,
HeaderFactory headerFactory)
Default constructor for the security manager.
|
AuthenticationHelperImpl(SIPTransactionStack sipStack,
SecureAccountManager accountManager,
HeaderFactory headerFactory)
Default constructor for the security manager.
|
| Modifier and Type | Method and Description |
|---|---|
ClientTransaction |
handleChallenge(Response challenge,
ClientTransaction challengedTransaction,
SipProvider transactionCreator,
int cacheTime)
Uses securityAuthority to determinie a set of valid user credentials for
the specified Response (Challenge) and appends it to the challenged
request so that it could be retransmitted.
|
ClientTransaction |
handleChallenge(Response challenge,
ClientTransaction challengedTransaction,
SipProvider transactionCreator,
int cacheTime,
boolean looseRouting)
Uses securityAuthority to determinie a set of valid user credentials for
the specified Response (Challenge) and appends it to the challenged
request so that it could be retransmitted.
|
void |
removeCachedAuthenticationHeaders(String callId)
Remove cached entry.
|
void |
setAuthenticationHeaders(Request request)
Attach authentication headers to the given request.
|
public AuthenticationHelperImpl(SIPTransactionStack sipStack, AccountManager accountManager, HeaderFactory headerFactory)
sipStack - -- our stack.accountManager - -- an implementation of the AccountManager interface.headerFactory - -- header factory.public AuthenticationHelperImpl(SIPTransactionStack sipStack, SecureAccountManager accountManager, HeaderFactory headerFactory)
sipStack - -- our stack.accountManager - -- an implementation of the AccountManager interface.headerFactory - -- header factory.public ClientTransaction handleChallenge(Response challenge, ClientTransaction challengedTransaction, SipProvider transactionCreator, int cacheTime) throws SipException, NullPointerException
AuthenticationHelperhandleChallenge in interface AuthenticationHelperchallenge - the 401/407 challenge responsechallengedTransaction - the transaction established by the challenged requesttransactionCreator - the JAIN SipProvider that we should use to create the new
transaction.cacheTime - The amount of time (seconds ) for which the authentication helper
will keep a reference to the generated credentials in a cache.
If you specify -1, then the authentication credentials are cached
until you remove them from the cache. If you choose this option, make sure
you remove the cached headers or you will have a memory leak.SipException - if we get an exception white creating the new transactionNullPointerException - if an argument or a header is null.public ClientTransaction handleChallenge(Response challenge, ClientTransaction challengedTransaction, SipProvider transactionCreator, int cacheTime, boolean looseRouting) throws SipException, NullPointerException
AuthenticationHelperhandleChallenge in interface AuthenticationHelperchallenge - the 401/407 challenge responsechallengedTransaction - the transaction established by the challenged requesttransactionCreator - the JAIN SipProvider that we should use to create the new
transaction.cacheTime - The amount of time (seconds ) for which the authentication helper
will keep a reference to the generated credentials in a cache.
If you specify -1, then the authentication credentials are cached
until you remove them from the cache. If you choose this option, make sure
you remove the cached headers or you will have a memory leak.looseRouting - avoid setting maddr and port on the request uri before calculating the responseSipException - if we get an exception white creating the new transactionNullPointerException - if an argument or a header is null.public void setAuthenticationHeaders(Request request)
AuthenticationHelpersetAuthenticationHeaders in interface AuthenticationHelperrequest - - the request for which we attach the authentication headers.public void removeCachedAuthenticationHeaders(String callId)
AuthenticationHelperremoveCachedAuthenticationHeaders in interface AuthenticationHelpercallId - -- the call Id for which we want to remove the cached headers.Copyright © 2014. All Rights Reserved.