FileDocCategorySizeDatePackage
SecretKeyCallback.javaAPI DocGlassfish v2 API4740Fri May 04 22:36:10 BST 2007javax.security.auth.message.callback

SecretKeyCallback

public class SecretKeyCallback extends Object implements Callback
Callback for acquiring a shared secret from a key repository. This Callback may be used by client or server authentication modules to obtain shared secrets (for example, passwords) without relying on a user during the Callback processing. This Callback is typically empoyed by ClientAuthModules invoked from intermediate components that need to acquire a password to authenticate to their target service.
version
%I%, %G%

Fields Summary
private Request
request
private SecretKey
key
Constructors Summary
public SecretKeyCallback(Request request)
Constructs this SecretKeyCallback with a secret key Request object.

The request object identifies the secret key to be returned. If the alias is null, the handler of the callback relies on its own default.

param
request Request object identifying the secret key, or null.

	this.request = request;
    
Methods Summary
public javax.crypto.SecretKeygetKey()
Used to obtain the secret key set within the Callback.

return
The secret key, or null if no key was found.

	return key;
    
public javax.security.auth.message.callback.SecretKeyCallback$RequestgetRequest()
Used by the CallbackHandler to get the Request object which identifies the secret key to be returned.

return
The Request object which identifies the private key to be returned, or null. If null, the handler of the callback relies on its own default.

	return request;
    
public voidsetKey(javax.crypto.SecretKey key)
Used by the CallbackHandler to set the requested secret key within the Callback.

param
key The secret key, or null if no key was found.

	this.key = key;