|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.protocol.sip.security.SipSecurityManager
public class SipSecurityManager
The class handles authentication challenges, caches user credentials and takes care (through the SecurityAuthority interface) about retrieving passwords.
| Constructor Summary | |
|---|---|
SipSecurityManager(AccountID accountID)
Default constructor for the security manager. |
|
| Method Summary | |
|---|---|
void |
cacheCredentials(String realm,
UserCredentials credentials)
Caches realm and credentials for later usage. |
javax.sip.header.AuthorizationHeader |
getCachedAuthorizationHeader(String callID)
Returns an authorization header cached against the specified callID or null if no auth. |
SecurityAuthority |
getSecurityAuthority()
Returns the SecurityAuthority instance that SipSecurityManager uses to obtain user credentials. |
javax.sip.ClientTransaction |
handleChallenge(javax.sip.message.Response challenge,
javax.sip.ClientTransaction challengedTransaction,
javax.sip.SipProvider transactionCreator)
Uses securityAuthority to determine a set of valid user credentials for the specified Response (Challenge) and appends it to the challenged request so that it could be retransmitted. |
javax.sip.ClientTransaction |
handleChallenge(javax.sip.message.Response challenge,
javax.sip.ClientTransaction challengedTransaction,
javax.sip.SipProvider transactionCreator,
long newCSeq)
Uses securityAuthority to determine a set of valid user credentials for the specified Response (Challenge) and appends it to the challenged request so that it could be retransmitted. |
javax.sip.ClientTransaction |
handleForbiddenResponse(javax.sip.message.Response forbidden,
javax.sip.ClientTransaction endedTransaction,
javax.sip.SipProvider transactionCreator)
Handles a 403 Forbidden response. |
void |
setHeaderFactory(javax.sip.header.HeaderFactory headerFactory)
Set the header factory to be used when creating authorization headers |
void |
setSecurityAuthority(SecurityAuthority authority)
Sets the SecurityAuthority instance that should be queried for user credentials. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SipSecurityManager(AccountID accountID)
accountID - the id of the account that this security manager is
going to serve.| Method Detail |
|---|
public void setHeaderFactory(javax.sip.header.HeaderFactory headerFactory)
headerFactory - the header factory that we'll be using when creating
authorization headers.
public javax.sip.ClientTransaction handleChallenge(javax.sip.message.Response challenge,
javax.sip.ClientTransaction challengedTransaction,
javax.sip.SipProvider transactionCreator)
throws javax.sip.SipException,
javax.sip.InvalidArgumentException,
OperationFailedException,
NullPointerException
challenge - the 401/407 challenge responsechallengedTransaction - the transaction established by the
challenged requesttransactionCreator - the JAIN SipProvider that we should use to
create the new transaction.
javax.sip.SipException - if we get an exception white creating the
new transaction
javax.sip.InvalidArgumentException - if we fail to create a new header
containing user credentials.
NullPointerException - if an argument or a header is null.
OperationFailedException - if we fail to acquire a password from
our security authority.
public javax.sip.ClientTransaction handleChallenge(javax.sip.message.Response challenge,
javax.sip.ClientTransaction challengedTransaction,
javax.sip.SipProvider transactionCreator,
long newCSeq)
throws javax.sip.SipException,
javax.sip.InvalidArgumentException,
OperationFailedException,
NullPointerException
challenge - the 401/407 challenge responsechallengedTransaction - the transaction established by the
challenged requesttransactionCreator - the JAIN SipProvider that we should use to
create the new transaction.newCSeq - if the caller is generating its own cseqs can supply such,
otherwise can provide -1 for auto generating it. Mean that the value
from the initial request will be incremented.
javax.sip.SipException - if we get an exception white creating the
new transaction
javax.sip.InvalidArgumentException - if we fail to create a new header
containing user credentials.
NullPointerException - if an argument or a header is null.
OperationFailedException - if we fail to acquire a password from
our security authority.public void setSecurityAuthority(SecurityAuthority authority)
authority - the SecurityAuthority instance that should be queried
for user credentials.public SecurityAuthority getSecurityAuthority()
public javax.sip.ClientTransaction handleForbiddenResponse(javax.sip.message.Response forbidden,
javax.sip.ClientTransaction endedTransaction,
javax.sip.SipProvider transactionCreator)
throws javax.sip.InvalidArgumentException,
javax.sip.TransactionUnavailableException
forbidden - the 401/407 challenge responseendedTransaction - the transaction established by the challenged
requesttransactionCreator - the JAIN SipProvider that we should use to
create the new transaction.
javax.sip.InvalidArgumentException - if we fail to create a new header
containing user credentials.
javax.sip.TransactionUnavailableException - if we get an exception white
creating the new transaction
public void cacheCredentials(String realm,
UserCredentials credentials)
realm - thecredentials - UserCredentialspublic javax.sip.header.AuthorizationHeader getCachedAuthorizationHeader(String callID)
callID - the ID of the call that we'd like to reString
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||