クラス org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator

org.objectweb.cjdbc.controller.authentication.PasswordAuthenticatorのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

説明

This class defines a PasswordAuthenticator

作者:
Marc Wick
バージョン:
1.0

PasswordAuthenticator.java38 行で定義されています。

Public メソッド

 PasswordAuthenticator (String username, String password)
Subject authenticate (Object credentials) throws SecurityException

Static Public メソッド

Object createCredentials (String username, String password)

Static Public 変数

final PasswordAuthenticator NO_AUTHENICATION

スタティック変数

Trace logger

Private 変数

String username
String password


コンストラクタとデストラクタ

org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.PasswordAuthenticator String  username,
String  password
 

Creates a new PasswordAuthenticator.java object

引数:
username username/loginname
password password
PasswordAuthenticator.java61 行で定義されています。
00062 { 00063 this.username = username; 00064 this.password = password; 00065 }


メソッド

Subject org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.authenticate Object  credentials  )  throws SecurityException
 

参照:
javax.management.remote.JMXAuthenticator#authenticate(java.lang.Object)
PasswordAuthenticator.java82 行で定義されています。

参照先 org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.logger, org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.password, と org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.username.

00083 { 00084 try 00085 { 00086 if (username == null && password == null) 00087 { 00088 // no authentication is required we return 00089 return new Subject(); 00090 } 00091 00092 if (credentials == null) 00093 { 00094 throw new SecurityException("credentials are required"); 00095 } 00096 00097 try 00098 { 00099 String[] credentialsArray = (String[]) credentials; 00100 if (username.equals(credentialsArray[0]) 00101 && password.equals(credentialsArray[1])) 00102 { 00103 // username and password are ok 00104 if (logger.isDebugEnabled()) 00105 { 00106 logger.debug("successfully authenitcated "); 00107 } 00108 return new Subject(); 00109 } 00110 } 00111 catch (Exception e) 00112 { 00113 // the credentials object makes problems, is was probably not created 00114 // with the createCredentials method 00115 throw new SecurityException("problems with credentials object : " 00116 + e.getMessage()); 00117 } 00118 00119 // username and password do not match 00120 throw new SecurityException("invalid credentials"); 00121 } 00122 catch (SecurityException e) 00123 { 00124 logger.error(e.getMessage()); 00125 try 00126 { 00127 String clientId = java.rmi.server.RemoteServer.getClientHost(); 00128 logger.warn("refused unauthorized access for client " + clientId); 00129 } 00130 catch (Exception ex) 00131 { 00132 00133 } 00134 throw e; 00135 } 00136 }

Object org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.createCredentials String  username,
String  password
[static]
 

create a credentials object with the supplied username and password

引数:
username username
password password
戻り値:
credentials Object to be used for authentication,
PasswordAuthenticator.java74 行で定義されています。
00075 { 00076 return new String[]{username, password}; 00077 }


変数

Trace org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.logger [static, package]
 

初期値:

Trace .getLogger("org.objectweb.cjdbc.controller.authentication")
PasswordAuthenticator.java49 行で定義されています。

参照元 org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.authenticate().

final PasswordAuthenticator org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.NO_AUTHENICATION [static]
 

初期値:

new PasswordAuthenticator( null, null)
to enable subject delegation we use a dummy authentication even if none is configured PasswordAuthenticator.java46 行で定義されています。

String org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.password [private]
 

PasswordAuthenticator.java53 行で定義されています。

参照元 org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.authenticate().

String org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.username [private]
 

PasswordAuthenticator.java52 行で定義されています。

参照元 org.objectweb.cjdbc.controller.authentication.PasswordAuthenticator.authenticate().


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.4に対してTue Oct 12 15:16:35 2004に生成されました。 doxygen 1.3.8