All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.habanero.security.Authenticator

java.lang.Object
   |
   +----ncsa.habanero.security.Authenticator

public class Authenticator
extends Object
This class contains the utilities to authenticate a new session joiner.


Constructor Index

 o Authenticator()

Method Index

 o belongsToDomain(String, String, String)
 o canJoinSession(Session, SessionParticipant)
 o canJoinSessionWithAuthentication(Session, SessionParticipant, int, String)
 o inPasswordFile(String, String)
 o validPassword(Session, SessionParticipant, String)
 o validPassword(Session, SessionParticipant, String, String)
 o validUserPassword(Session, SessionParticipant, String)
 o validUserPassword(Session, SessionParticipant, String, String)

Constructors

 o Authenticator
 public Authenticator()

Methods

 o canJoinSession
 public static boolean canJoinSession(Session session,
                                      SessionParticipant joiner) throws AuthenticationException
Parameters:
session - the session that a participant wants to join
joiner - a participant willing to join the session
Returns:
true if the participant is allowed to join the session
 o canJoinSessionWithAuthentication
 public static boolean canJoinSessionWithAuthentication(Session session,
                                                        SessionParticipant joiner,
                                                        int type,
                                                        String authentication)
Parameters:
session - the session that a participant wants to join
joiner - a participant willing to join the session
type - type of the password
authentication - the authentication string from the joiner
Returns:
true if the participant is allowed to join the session
 o belongsToDomain
 public static boolean belongsToDomain(String address,
                                       String allowed,
                                       String denied)
Parameters:
address - the hostname and IP of a participant who wants to join
allowed - a string of valid domain names, maybe with wildcards.
denied - a string of invalid domain names, maybe with wildcards.
Returns:
true if the participant is allowed to join the session
 o validPassword
 public static boolean validPassword(Session s,
                                     SessionParticipant p,
                                     String password)
Parameters:
s - the session that a participant wants to join
p - a participant willing to join the session
password - a valid encrypted session password
Returns:
true if the potential participant knows the password
 o validPassword
 public static boolean validPassword(Session s,
                                     SessionParticipant p,
                                     String password,
                                     String userPassword)
Parameters:
s - the session that a participant wants to join
p - a participant willing to join the session
password - a valid encrypted session password
userPassword - the password given by the user
Returns:
true if the potential participant knows the password
 o validUserPassword
 public static boolean validUserPassword(Session s,
                                         SessionParticipant p,
                                         String file)
Parameters:
s - the session that a participant wants to join
p - a participant willing to join the session
file - a password file in the session owner's machine
Returns:
true if the potential participant has a valid password
 o validUserPassword
 public static boolean validUserPassword(Session s,
                                         SessionParticipant p,
                                         String file,
                                         String userIdPassword)
Parameters:
s - the session that a participant wants to join
p - a participant willing to join the session
file - a password file in the session owner's machine
userIdPassword - the id and password of the joiner
Returns:
true if the potential participant has a valid password
 o inPasswordFile
 public static boolean inPasswordFile(String file,
                                      String up)
Parameters:
file - a file name with users and passwords
up - a user/password combination: "user//password"
Returns:
true if the password is valid for that file.

All Packages  Class Hierarchy  This Package  Previous  Next  Index