|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.asterisk.manager.action.AbstractManagerAction
net.sf.asterisk.manager.action.LoginAction
public class LoginAction
The LoginAction authenticates the connection.
A successful login is the precondition for sending any other action except
for the ChallengeAction.
An unsuccessful login results in an ManagerError being received from the
server with a message set to "Authentication failed" and the socket being
closed by Asterisk.
ChallengeAction,
ManagerError,
Serialized Form| Constructor Summary | |
|---|---|
LoginAction()
Creates a new empty LoginAction. |
|
LoginAction(java.lang.String username,
java.lang.String secret)
Creates a new LoginAction that performs a cleartext login. You should not use cleartext login if you are concerned about security, using ChallengeAction and login with a password hash instead. |
|
LoginAction(java.lang.String username,
java.lang.String authType,
java.lang.String key)
Creates a new LoginAction that performs a login via challenge/response. |
|
LoginAction(java.lang.String username,
java.lang.String authType,
java.lang.String key,
java.lang.String events)
Creates a new LoginAction that performs a login via challenge/response. |
|
| Method Summary | |
|---|---|
java.lang.String |
getAction()
Returns the name of this action, i.e. |
java.lang.String |
getAuthType()
Returns the digest alogrithm when using challenge/response. |
java.lang.String |
getEvents()
Returns the event mask. |
java.lang.String |
getKey()
|
java.lang.String |
getSecret()
Returns the secret. |
java.lang.String |
getUsername()
Returns the username. |
void |
setAuthType(java.lang.String authType)
Sets the digest alogrithm when using challenge/response. The digest algorithm is used to create the key based on the challenge and the user's password. Currently Asterisk supports only "MD5". |
void |
setEvents(java.lang.String events)
Sets the event mask. |
void |
setKey(java.lang.String key)
|
void |
setSecret(java.lang.String secret)
Sets the secret to use when using cleartext login. The secret contains the user's password as configured in Asterisk's manager.conf.The secret and key properties are mutually exclusive. |
void |
setUsername(java.lang.String username)
Sets the username as configured in asterik's manager.conf. |
| Methods inherited from class net.sf.asterisk.manager.action.AbstractManagerAction |
|---|
getActionId, setActionId, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LoginAction()
public LoginAction(java.lang.String username,
java.lang.String secret)
ChallengeAction and login with a password hash instead.
username - the username as configured in Asterisk's
manager.confsecret - the user's password as configured in Asterisk's
manager.conf
public LoginAction(java.lang.String username,
java.lang.String authType,
java.lang.String key)
username - the username as configured in Asterisk's
manager.confauthType - the digest alogrithm, must match the digest algorithm
that was used with the corresponding ChallengeAction.key - the hash of the user's password and the challenge
public LoginAction(java.lang.String username,
java.lang.String authType,
java.lang.String key,
java.lang.String events)
username - the username as configured in Asterisk's
manager.confauthType - the digest alogrithm, must match the digest algorithm
that was used with the corresponding ChallengeAction.key - the hash of the user's password and the challengeevents - the event mask. Set to "on" if all events should be send,
"off" if not events should be sent or a combination of
"system", "call" and "log" (separated by ',') to specify what
kind of events should be sent.| Method Detail |
|---|
public java.lang.String getAction()
getAction in interface ManagerActiongetAction in class AbstractManagerActionpublic java.lang.String getUsername()
public void setUsername(java.lang.String username)
manager.conf.
public java.lang.String getSecret()
public void setSecret(java.lang.String secret)
manager.conf.
public java.lang.String getAuthType()
public void setAuthType(java.lang.String authType)
public java.lang.String getKey()
public void setKey(java.lang.String key)
key - The key to set.public java.lang.String getEvents()
public void setEvents(java.lang.String events)
events - the event mask. Set to "on" if all events should be send,
"off" if not events should be sent or a combination of
"system", "call" and "log" (separated by ',') to specify what
kind of events should be sent.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||