com.jalios.jcms.authentication.handlers
Class AuthKeyHints

java.lang.Object
  extended by com.jalios.jcms.authentication.handlers.AuthKeyHints

public class AuthKeyHints
extends Object

Contains elements that may be used to construct an AuthKey

Since:
JCMS-6.0
Author:
dissert

Constructor Summary
AuthKeyHints()
           
 
Method Summary
 long getExpiration()
           
 String getIpMask()
           
 String getMethods()
           
 String getVersion()
           
 boolean isPrefixMode()
           
 void setExpiration(long expiration)
          Specify the expiration date of the authkey, in the epoch standard format.
 void setIpMask(String ipMask)
          An authkey may be generated only for authorized ip.
 void setMethods(String methods)
          Parameter to tell wich HTTP methods are allowed for a given authkey.
 void setPrefixMode(boolean prefixMode)
          Tells if an authkey has to be generated for only a given URL (default behaviour), or a range of URL beginning with a given prefix (prefix mode).
 void setVersion(String version)
          As the format of the authkey may be modified, to maintain compatibility, a version of the format is embedded in the authkey.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthKeyHints

public AuthKeyHints()
Method Detail

isPrefixMode

public boolean isPrefixMode()
Returns:
true if the authkey must be generated for a range of URL given a prefix URL.

setPrefixMode

public void setPrefixMode(boolean prefixMode)
Tells if an authkey has to be generated for only a given URL (default behaviour), or a range of URL beginning with a given prefix (prefix mode).

Parameters:
prefixMode -

getExpiration

public long getExpiration()
Returns:
the expiration date in the epoch format.

setExpiration

public void setExpiration(long expiration)
Specify the expiration date of the authkey, in the epoch standard format. If a negative value is set, a default duration is applied, based on the value returned by AuthKeyAuthenticationHandler.getDefaultAuthKeyDuration().

Parameters:
expiration -

getMethods

public String getMethods()
Returns:
a filter on allowed HTTP methods

setMethods

public void setMethods(String methods)
Parameter to tell wich HTTP methods are allowed for a given authkey. A request is allowed if the HTTP method of the request is contained (as a substring) in the "methods" field.

Parameters:
methods -

getIpMask

public String getIpMask()
Returns:
a Perl 5 regexp for authorized IP.

setIpMask

public void setIpMask(String ipMask)
An authkey may be generated only for authorized ip. The ipmask field defines a Perl 5 regular expression to restrict the authkey to a given mask of IP addresses.

Parameters:
ipMask - a Perl 5 regexp for authorized IP.

getVersion

public String getVersion()
Returns:
the version used to create a given authkey.

setVersion

public void setVersion(String version)
As the format of the authkey may be modified, to maintain compatibility, a version of the format is embedded in the authkey.

Parameters:
version -


Copyright © 2001-2010 Jalios SA. All Rights Reserved.