public interface SecurityAuthority
Or in other (simpler words) this is a callback or a hook that the UI would give a protocol provider so that the protocol provider could requestCredentials() when necessary (when a password is not available for a server, or once it has changed, or re-demand one after a faulty authentication)
Modifier and Type | Field and Description |
---|---|
static int |
AUTHENTICATION_REQUIRED
Indicates that the reason for obtaining credentials is that an
authentication is required.
|
static int |
CONNECTION_FAILED
Indicates that the reason for obtaining credentials is that the last time
a wrong user name has been provided.
|
static int |
WRONG_PASSWORD
Indicates that the reason for obtaining credentials is that the last time
a wrong password has been provided.
|
static int |
WRONG_USERNAME
Indicates that the reason for obtaining credentials is that the last time
a wrong user name has been provided.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isUserNameEditable()
Indicates if the user name is currently editable, i.e.
|
UserCredentials |
obtainCredentials(java.lang.String realm,
UserCredentials defaultValues)
Returns a UserCredentials object associated with the specified realm, by
specifying the reason of this operation.
|
UserCredentials |
obtainCredentials(java.lang.String realm,
UserCredentials defaultValues,
int reasonCode)
Returns a UserCredentials object associated with the specified realm, by
specifying the reason of this operation.
|
void |
setUserNameEditable(boolean isUserNameEditable)
Sets the userNameEditable property, which should indicate to the
implementations of this interface if the user name could be changed by
user or not.
|
static final int AUTHENTICATION_REQUIRED
static final int WRONG_PASSWORD
static final int WRONG_USERNAME
static final int CONNECTION_FAILED
UserCredentials obtainCredentials(java.lang.String realm, UserCredentials defaultValues, int reasonCode)
realm
- The realm that the credentials are needed for.defaultValues
- the values to propose the user by defaultreasonCode
- indicates the reason for which we're obtaining the
credentials.UserCredentials obtainCredentials(java.lang.String realm, UserCredentials defaultValues)
realm
- The realm that the credentials are needed for.defaultValues
- the values to propose the user by defaultvoid setUserNameEditable(boolean isUserNameEditable)
isUserNameEditable
- indicates if the user name could be changed by
user in the implementation of this interface.boolean isUserNameEditable()
true
if the user name could be changed,
false
- otherwise.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.