org.apache.commons.vfs2.auth
Class StaticUserAuthenticator

java.lang.Object
  extended by org.apache.commons.vfs2.auth.StaticUserAuthenticator
All Implemented Interfaces:
java.lang.Comparable<StaticUserAuthenticator>, UserAuthenticator

public class StaticUserAuthenticator
extends java.lang.Object
implements UserAuthenticator, java.lang.Comparable<StaticUserAuthenticator>

Provides always the same credentials data passed in with the constructor.

Author:
Commons VFS team

Constructor Summary
StaticUserAuthenticator(java.lang.String domain, java.lang.String username, java.lang.String password)
           
 
Method Summary
 int compareTo(StaticUserAuthenticator other)
          
 boolean equals(java.lang.Object obj)
          
 int hashCode()
          
 UserAuthenticationData requestAuthentication(UserAuthenticationData.Type[] types)
          Queries the given type from the user.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StaticUserAuthenticator

public StaticUserAuthenticator(java.lang.String domain,
                               java.lang.String username,
                               java.lang.String password)
Method Detail

requestAuthentication

public UserAuthenticationData requestAuthentication(UserAuthenticationData.Type[] types)
Description copied from interface: UserAuthenticator
Queries the given type from the user.

Specified by:
requestAuthentication in interface UserAuthenticator
Parameters:
types - An array containing the user's credentials
Returns:
The UserAuthenticationData.

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object
Since:
2.0

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object
Since:
2.0

compareTo

public int compareTo(StaticUserAuthenticator other)

Specified by:
compareTo in interface java.lang.Comparable<StaticUserAuthenticator>
Since:
2.0

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
Since:
2.0