Package com.iplanet.dpro.session
Class TokenRestrictionFactory
- java.lang.Object
-
- com.iplanet.dpro.session.TokenRestrictionFactory
-
public class TokenRestrictionFactory extends Object
Factory for creatingTokenRestriction
instances.
-
-
Constructor Summary
Constructors Constructor Description TokenRestrictionFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DNOrIPAddressListTokenRestriction
createDNOrIPAddressListTokenRestriction(String dn, Set<String> hostNames)
Create a new instance ofDNOrIPAddressListTokenRestriction
, which handles the restriction of theDN
orIPAddress
.NoOpTokenRestriction
createNoOpTokenRestriction()
Create a new instance ofNoOpTokenRestriction
, which always satisfies the restriction.static String
marshal(TokenRestriction tokenRestriction)
Serializes the restriction object.static TokenRestriction
unmarshal(String data)
Deserialize the string into Token Restriction object.
-
-
-
Method Detail
-
marshal
public static String marshal(TokenRestriction tokenRestriction) throws Exception
Serializes the restriction object.- Parameters:
tokenRestriction
- Token Restriction object to be serialized.- Returns:
- a serialized form of the restriction object.
- Throws:
Exception
- if the there was an error.
-
unmarshal
public static TokenRestriction unmarshal(String data) throws Exception
Deserialize the string into Token Restriction object.- Parameters:
data
- Token Restriction object in the string format.- Returns:
- a Token Restriction object.
- Throws:
Exception
- if the there was an error.
-
createNoOpTokenRestriction
public NoOpTokenRestriction createNoOpTokenRestriction()
Create a new instance ofNoOpTokenRestriction
, which always satisfies the restriction.- Returns:
- a new instance of
NoOpTokenRestriction
.
-
createDNOrIPAddressListTokenRestriction
public DNOrIPAddressListTokenRestriction createDNOrIPAddressListTokenRestriction(String dn, Set<String> hostNames) throws UnknownHostException, SSOException, SMSException
Create a new instance ofDNOrIPAddressListTokenRestriction
, which handles the restriction of theDN
orIPAddress
.- Parameters:
dn
- theDN
of the user.hostNames
- the list of host names.- Returns:
- a new instance of
DNOrIPAddressListTokenRestriction
. - Throws:
UnknownHostException
- if the host cannot be resolved.SSOException
- if the single sign on token is invalid or expired.SMSException
- if an error occurred while trying to perform the operation.
-
-