public class IceAuthenticatorImpl extends Object implements IceAuthenticator
| Modifier and Type | Field and Description |
|---|---|
protected String |
password |
protected String |
remotePassword |
protected String |
remoteUfrag |
protected String |
ufrag |
| Constructor and Description |
|---|
IceAuthenticatorImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
generateIceCredentials()
The ice-ufrag and ice-pwd attributes MUST be chosen randomly at the beginning of a session.
|
byte[] |
getLocalKey(String ufrag)
Gets the password assigned to a local user.
|
String |
getPassword() |
byte[] |
getRemoteKey(String ufrag,
String media)
Gets the password assigned to a remote user.
|
String |
getRemotePassword() |
String |
getRemoteUfrag() |
String |
getUfrag() |
boolean |
isUserRegistered(String ufrag)
Verifies whether a local user is registered.
|
void |
reset() |
void |
setRemotePassword(String remotePassword) |
void |
setRemoteUfrag(String remoteUfrag) |
boolean |
validateUsername(String username)
Validates the autenticity of a STUN USERNAME attribute.
The agent MUST consider the username to be valid if it consists of two values separated by a colon, where the first value is equal to the username fragment generated by the agent in an offer or answer for a session in-progress. |
protected String ufrag
protected String password
protected String remoteUfrag
protected String remotePassword
public String getUfrag()
public String getPassword()
public String getRemoteUfrag()
public void setRemoteUfrag(String remoteUfrag)
public String getRemotePassword()
public void setRemotePassword(String remotePassword)
public void generateIceCredentials()
The ice-ufrag attribute MUST contain at least 24 bits of randomness, and the ice-pwd attribute MUST contain at least 128
bits of randomness.
This means that the ice-ufrag attribute will be at least 4 characters long, and the ice-pwd at least 22 characters long,
since the grammar for these attributes allows for 6 bits of randomness per character.
The attributes MAY be longer than 4 and 22 characters, respectively, of course, up to 256 characters. The upper limit
allows for buffer sizing in implementations. Its large upper limit allows for increased amounts of randomness to be added
over time.
public byte[] getLocalKey(String ufrag)
IceAuthenticatorgetLocalKey in interface IceAuthenticatorufrag - the fragment of the local userpublic byte[] getRemoteKey(String ufrag, String media)
IceAuthenticatorgetRemoteKey in interface IceAuthenticatorufrag - the fragment of the remote usermedia - the name of the target media streampublic boolean isUserRegistered(String ufrag)
IceAuthenticatorisUserRegistered in interface IceAuthenticatorufrag - the fragment of the local userpublic boolean validateUsername(String username)
IceAuthenticatorvalidateUsername in interface IceAuthenticatorusername - The username to be validatedpublic void reset()
Copyright © 2017 TeleStax, Inc.. All Rights Reserved.