-
- All Implemented Interfaces:
public class CredentialsManagerThe CredentialsManager allows an application to handle verification of incoming MessageIntegrityAttributes by registering a CredentialsAuthority implementation. The point of this mechanism is to allow use in both applications that would handle large numbers of possible users (such as STUN/TURN servers) or others that would only work with a few, like for example an ICE implementation. TODO: just throwing a user name at the manager and expecting it to find an authority that knows about it may lead to ambiguities so we may need to add other parameters in here that would allow us to better select an authority.
-
-
Method Summary
Modifier and Type Method Description booleancheckLocalUserName(String username)Verifies whether username is currently known to any of the CredentialsAuthoritys registered with this manager and and returns true if so. Array<byte>getLocalKey(String username)Queries all currently registered CredentialsAuthoritys for a password corresponding to the specified local username or user frag and returns the first non-null one. Array<byte>getRemoteKey(String username, String media)Queries all currently registered CredentialsAuthoritys for a password corresponding to the specified remote username or user frag and returns the first non-null one. voidregisterAuthority(CredentialsAuthority authority)Adds authority to the list of CredentialsAuthoritys registered with this manager. voidunregisterAuthority(CredentialsAuthority authority)Removes authority from the list of CredentialsAuthoritys registered with this manager. -
-
Method Detail
-
checkLocalUserName
boolean checkLocalUserName(String username)
Verifies whether username is currently known to any of the CredentialsAuthoritys registered with this manager and and returns true if so. Returns false otherwise.
- Parameters:
username- the user name whose validity we'd like to check.
-
getLocalKey
Array<byte> getLocalKey(String username)
Queries all currently registered CredentialsAuthoritys for a password corresponding to the specified local username or user frag and returns the first non-null one.
- Parameters:
username- a local user name or user frag whose credentials we'd like to obtain.
-
getRemoteKey
Array<byte> getRemoteKey(String username, String media)
Queries all currently registered CredentialsAuthoritys for a password corresponding to the specified remote username or user frag and returns the first non-null one.
- Parameters:
username- a remote user name or user frag whose credentials we'd like to obtain.media- the media name that we want to get remote key.
-
registerAuthority
void registerAuthority(CredentialsAuthority authority)
Adds authority to the list of CredentialsAuthoritys registered with this manager.
- Parameters:
authority- the CredentialsAuthority to add to this manager.
-
unregisterAuthority
void unregisterAuthority(CredentialsAuthority authority)
Removes authority from the list of CredentialsAuthoritys registered with this manager.
- Parameters:
authority- the CredentialsAuthority to remove from this manager.
-
-
-
-