|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.ifs.common.TokenCredential
A TokenCredential encapsulates a token created by an authenticated LibrarySession that may be used to create a new LibrarySession, authenticating as the same DirectoryUser as the earlier session.
Constructor Summary | |
TokenCredential(LibrarySession session)
Constructs a new TokenCredential. |
Method Summary | |
int |
getAllowedAuthenticationCount()
Gets the total number of times this TokenCredential can be used to authenticate. |
java.lang.String |
getName()
Gets the name of the user. |
java.io.Serializable |
getParameter(java.lang.String name)
Gets the value of the specified parameter. |
java.util.Hashtable |
getParameters(boolean required)
Gets the specified parameters. |
int |
getTimeoutPeriod()
Gets the period of time for which this TokenCredential is valid. |
java.lang.String |
getToken()
Gets the token. |
int |
getTokenLength()
Gets the length of the token. |
void |
setAllowedAuthenticationCount(int count)
Sets the total number of times this TokenCredential can be used to authenticate. |
void |
setParameter(java.lang.String name,
java.io.Serializable value,
boolean required)
Sets an application-defined parameter for this TokenCredential. |
void |
setTimeoutPeriod(int period)
Sets the period of time for which this TokenCredential is valid. |
void |
setTokenLength(int length)
Sets the length of the token. |
Constructor Detail |
public TokenCredential(LibrarySession session) throws IfsException
session
- the session that constructs the TokenCredentialIfsException
- (IFS-10180) if the operation failsMethod Detail |
public java.lang.String getName() throws IfsException
getName
in interface Credential
IfsException
- if the operation failspublic void setTimeoutPeriod(int period) throws IfsException
The time period begins when getToken
is called for
the first time. The timeout period defaults to 600 seconds.
period
- the timeout period, in secondsIfsException
- (IFS-10181) if the operation failspublic int getTimeoutPeriod() throws IfsException
IfsException
- if the operation failspublic void setAllowedAuthenticationCount(int count) throws IfsException
Defaults to 1 time.
count
- the countIfsException
- (IFS-10182) if the operation failspublic int getAllowedAuthenticationCount() throws IfsException
IfsException
- if the operation failspublic void setTokenLength(int length) throws IfsException
Defaults to 40 characters.
length
- the token length, in charactersIfsException
- (IFS-10183) if the operation failspublic int getTokenLength() throws IfsException
length
- the token length, in charactersIfsException
- if the operation failspublic java.lang.String getToken() throws IfsException
When this method is invoked for the first time, this TokenCredential becomes immutable.
IfsException
- (IFS-10184) if the operation failspublic void setParameter(java.lang.String name, java.io.Serializable value, boolean required) throws IfsException
Parameters may be used in two ways:
Setting a parameter with required
equal to true forces
the application attempting to authenticate using this TokenCredential
to supply the identical parameter name and value. This can be used
to increase the security of the TokenCredential when the processes
creating and using the credential have shared knowledge of some data,
such as the client's IP address.
Setting a parameter with required
equal to false allows
the process creating the credential to pass data to the process using
the credential.
name
- the parameter namevalue
- the parameter valuerequired
- whether the application attempting to authenticate
using this TokenCredential must supply an identical
parameter name and value to succeedIfsException
- (IFS-10185) if the operation failspublic java.io.Serializable getParameter(java.lang.String name) throws IfsException
name
- the parameter nameIfsException
- (IFS-10186) if the operation failspublic java.util.Hashtable getParameters(boolean required) throws IfsException
required
- if true, returns only the required parameters;
if false, returns only the non-required parametersIfsException
- if the operation fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |