Klasse Ltpa2Token
java.lang.Object
de.sephirothj.spring.security.ltpa2.Ltpa2Token
Represents an LTPA2-Token
- Autor:
- Sephiroth
-
Feldübersicht
Felder -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetAttribute
(String attribute) get the value of the specified attributeboolean
checks if this token is expiredstatic Ltpa2Token
creates a new instance out of serialized (tokenized) tokenvoid
sets the expiration of the tokenvoid
setExpire
(LocalDateTime expire) sets the expiration of the tokenvoid
sets the user of the tokentoString()
gets the token as serialized (tokenized) stringwithAttribute
(String attribute, String value) sets an attribute
-
Felddetails
-
USER_ATTRIBUTE_NAME
the well-known name for the attribute containing the username- Siehe auch:
-
EXPIRE_ATTRIBUTE_NAME
the well-known name for the attribute containing the expiration- Siehe auch:
-
-
Konstruktordetails
-
Ltpa2Token
public Ltpa2Token()
-
-
Methodendetails
-
setExpire
sets the expiration of the token- Parameter:
expire
- the (new) expiration date
-
setExpire
sets the expiration of the token- Parameter:
expire
- the (new) expiration date in milliseconds since 01.01.1970T00:00:00Z
-
isExpired
public boolean isExpired()checks if this token is expired- Gibt zurück:
- whether the token is expired or not
-
setUser
sets the user of the token- Parameter:
user
- the (new) user DN
-
getAttribute
get the value of the specified attribute
known attributes:
- u: same as
user
- expire:
expire
- host
- port
- java.naming.provider.url
- process.serverName
- security.authMechOID
- type
- Parameter:
attribute
- the name of the attribute- Gibt zurück:
- attribute value. may be
null
- u: same as
-
withAttribute
sets an attribute- Parameter:
attribute
- the name of the attributevalue
- attribute value- Gibt zurück:
- this instance for chaining
-
toString
gets the token as serialized (tokenized) string -
of
creates a new instance out of serialized (tokenized) token- Parameter:
serializedToken
- a serialized LTPA2 token (unencrypted)- Gibt zurück:
- new instance
- Löst aus:
IllegalArgumentException
- if the given token is empty
-