|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.bsvrz.dav.dav.main.AuthentificationComponent
public class AuthentificationComponent
Diese Klasse enhält die Komponenten zur Authentifizierung eines Benutzers/Applikation.
Field Summary | |
---|---|
private AuthentificationProcess |
_authentificationProcess
Das Authentifikationsverfahren |
private Hashtable<String,String> |
_table
Speichert zu dem Namen einer Applikation einen Zufallstext, der mit getAuthentificationText(String) erzeugt wurde. |
Constructor Summary | |
---|---|
AuthentificationComponent(AuthentificationProcess authentificationProcess)
|
Method Summary | |
---|---|
(package private) boolean |
authentify(String applicationName,
String password,
byte[] encryptedRandomText)
Diese Methode verschlüsselt mit dem Passwort der Appliktion den Zufallstext, der zu einer Applikation gehört. |
AuthentificationProcess |
getAuthentificationProcess()
Gibt den Authentifikationsprozess zurück, der benutzt wird um die Authentifizierung eines Benutzers zu prüfen. |
String |
getAuthentificationText(String applicationName)
Generiert für eine Applikation einen Zufallstext und speichert diesen. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Hashtable<String,String> _table
getAuthentificationText(String)
erzeugt wurde.
Als Schlüssel dient der Name der Applikation, als Value wird der Zufallstext zurückgegeben.
private AuthentificationProcess _authentificationProcess
Constructor Detail |
---|
public AuthentificationComponent(AuthentificationProcess authentificationProcess)
authentificationProcess
- Verschlüsslungsverfahren, das benutzt wird um Authentifizierungsdaten zu prüfen.Method Detail |
---|
public final AuthentificationProcess getAuthentificationProcess()
public final String getAuthentificationText(String applicationName)
applicationName
- Name der Applikation, für den ein Zufallstext erzeugt werden soll.
final boolean authentify(String applicationName, String password, byte[] encryptedRandomText)
encryptedRandomText
mit dem gerade erzeugten verschlüsselten Text übereinstimmt.
Ist dies der Fall, so wird true
zurückgegeben.
Die Methode löscht in jedem Fall bei Beendigung den Zufallstext, der zu einer Applikation gehört. Ein zweiter Anmeldeversuch mit dem selben Zufallstext ist
also nicht möglich und wird immer zum Ergebnis false
führen, auch wenn das Passwort richtig ist.
applicationName
- Name der Applikation, die sich authentifizieren möchte.password
- Das unverschlüsseltes Passwort der Applikation, die sich authentifizieren möchte.encryptedRandomText
- Verschlüsselter Zufallstext der Applikation, die sich authentifizieren will. Der Zufallstext wurde mit einem Passwort
verschlüsselt.
true
, die Authentifizierung war erfolgreich; false
sonst#getAuthentificationText(String)}
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |