|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The ProfileTokenImpl interface provides the template for classes implementing behavior delegated by a ProfileTokenCredential.
Field Summary | |
---|---|
static String |
PW_STR_NOPWD
String constant for *NOPWD special value. 10 character blank padded |
static String |
PW_STR_NOPWDCHK
String constant for *NOPWDCHK special value. 10 character blank padded |
Method Summary | |
---|---|
void |
destroy()
Destroy or clear sensitive information maintained by the credential implementation. |
byte[] |
generateToken(String uid,
int pwdSpecialValue,
int type,
int timeoutInterval)
Generates and returns a new profile token based on the provided information using a password special value. |
byte[] |
generateToken(String uid,
String pwd,
int type,
int timeoutInterval)
Deprecated. As of V5R3, replaced by generateTokenExtended(String,String,int,int)
for password strings
and generateToken(String,int,int,int) for password
special values |
byte[] |
generateTokenExtended(String uid,
String pwd,
int type,
int timeoutInterval)
Generates and returns a new profile token based on the provided information using a password string. |
int |
getTimeToExpiration()
Returns the number of seconds before the credential is due to expire. |
int |
getVersion()
Returns the version number for the implementation. |
boolean |
isCurrent()
Indicates if the credential is still considered valid for authenticating to associated server services or performing related actions. |
void |
refresh()
Updates or extends the validity period for the credential. |
byte[] |
refresh(int type,
int timeoutInterval)
Updates or extends the validity period for the credential. |
void |
setCredential(AS400Credential credential)
Sets the credential delegating behavior to the implementation object. |
AS400Credential |
swap(boolean genRtnCr)
Attempts to swap the thread identity based on this credential. |
Field Detail |
public static final String PW_STR_NOPWD
public static final String PW_STR_NOPWDCHK
Method Detail |
public byte[] generateToken(String uid, String pwd, int type, int timeoutInterval) throws RetrieveFailedException
generateTokenExtended(String,String,int,int)
for password strings
and generateToken(String,int,int,int)
for password
special values
uid
- The name of the user profile for which the token
is to be generated.pwd
- The user profile password (encoded).type
- The type of token.
Possible types are defined as fields on the
ProfileTokenCredential class:
timeoutInterval
- The number of seconds to expiration.
RetrieveFailedException
- If errors occur while generating the token.public byte[] generateToken(String uid, int pwdSpecialValue, int type, int timeoutInterval) throws RetrieveFailedException
uid
- The name of the user profile for which the token
is to be generated.pwdSpecialValue
- A password special value.
Possible types are defined as fields on the
ProfileTokenCredential class:
type
- The type of token.
Possible types are defined as fields on the
ProfileTokenCredential class:
timeoutInterval
- The number of seconds to expiration.
RetrieveFailedException
- If errors occur while generating the token.public byte[] generateTokenExtended(String uid, String pwd, int type, int timeoutInterval) throws RetrieveFailedException
uid
- The name of the user profile for which the token
is to be generated.pwd
- The user profile password (encoded).
Special values are not supported by this method.type
- The type of token.
Possible types are defined as fields on the
ProfileTokenCredential class:
timeoutInterval
- The number of seconds to expiration.
RetrieveFailedException
- If errors occur while generating the token.public byte[] refresh(int type, int timeoutInterval) throws RefreshFailedException
Generates a new profile token based on the previously established token with the given type and timeoutInterval.
This method is provided to handle cases where it is desirable to allow for a more restrictive type of token or a different timeout interval when a new token is generated during the refresh.
type
- The type of token.
Possible types are defined as fields on this class:
timeoutInterval
- The number of seconds before expiration.
RefreshFailedException
- If errors occur during refresh.public void destroy() throws DestroyFailedException
Subsequent requests may result in a NullPointerException.
DestroyFailedException
- If errors occur while destroying or clearing
credential implementation data.public int getTimeToExpiration() throws RetrieveFailedException
RetrieveFailedException
- If errors occur while retrieving
timeout information.public int getVersion()
Used to ensure the implementation is valid for specific functions.
public boolean isCurrent()
An exception is not thrown on failure to remain consistent with the Refreshable interface (even though some credential classes currently avoid the dependency established by implementing the interface).
public void refresh() throws RefreshFailedException
RefreshFailedException
- If errors occur during refresh.public void setCredential(AS400Credential credential)
credential
- The associated credential.public AS400Credential swap(boolean genRtnCr) throws SwapFailedException
genRtnCr
- Indicates whether a return credential should be
generated, even if supported. When appropriate,
not generating a return credential can
improve performance and avoid potential problems
in creating the credential.
SwapFailedException
- If errors occur while swapping thread identity.
SecurityException
- If the caller does not have permission to
modify the OS thread identity.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |