Openfire 3.4.1 Javadoc

org.jivesoftware.openfire.auth
Class AuthToken

java.lang.Object
  extended by org.jivesoftware.openfire.auth.AuthToken

public class AuthToken
extends Object

A token that proves that a user has successfully authenticated.

Author:
Matt Tucker
See Also:
AuthFactory

Constructor Summary
AuthToken(String jid)
          Constucts a new AuthToken with the specified username.
AuthToken(String jid, Boolean anonymous)
           
 
Method Summary
 String getDomain()
          Returns the domain associated with this AuthToken.
 String getUsername()
          Returns the username associated with this AuthToken.
 boolean isAnonymous()
          Returns true if this AuthToken is the Anonymous auth token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthToken

public AuthToken(String jid)
Constucts a new AuthToken with the specified username. The username can be either a simple username or a full JID.

Parameters:
jid - the username or bare JID to create an authToken token with.

AuthToken

public AuthToken(String jid,
                 Boolean anonymous)
Method Detail

getUsername

public String getUsername()
Returns the username associated with this AuthToken. A null value means that the authenticated user is anonymous.

Returns:
the username associated with this AuthToken or null when using an anonymous user.

getDomain

public String getDomain()
Returns the domain associated with this AuthToken.

Returns:
the domain associated with this AuthToken.

isAnonymous

public boolean isAnonymous()
Returns true if this AuthToken is the Anonymous auth token.

Returns:
true if this token is the anonymous AuthToken.

Openfire 3.4.1 Javadoc

Copyright © 2003-2007 Jive Software.