Top Description Inners Fields Constructors Methods
jakarta.security.auth.message.callback

public Class SecretKeyCallback

extends Object
implements Callback
Class Inheritance
All Implemented Interfaces
javax.security.auth.callback.Callback
Imports
javax.crypto.SecretKey, javax.security.auth.callback.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 called by ClientAuthModules invoked from intermediate components that need to acquire a password to authenticate to their target service.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
SecretKeyCallback.AliasRequest

Request type for secret keys that are identified using an alias.

public static interface
SecretKeyCallback.Request

Marker interface for secret key request types.

Field Summary

Modifier and TypeField and Description
private SecretKey
private SecretKeyCallback.Request

Constructor Summary

AccessConstructor and Description
public
SecretKeyCallback(SecretKeyCallback.Request
Request object identifying the secret key, or null.
request
)

Constructs this SecretKeyCallback with a secret key Request object.

Method Summary

Modifier and TypeMethod and Description
public SecretKey

Returns:

The secret key, or null if no key was found.
getKey
()

Used to obtain the secret key set within the Callback.

public SecretKeyCallback.Request

Returns:

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.
getRequest
()

Used by the CallbackHandler to get the Request object which identifies the secret key to be returned.

public void
setKey(SecretKey
The secret key, or null if no key was found.
key
)

Used by the CallbackHandler to set the requested secret key within the Callback.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

keyback to summary
private SecretKey key
requestback to summary
private SecretKeyCallback.Request request

Constructor Detail

SecretKeyCallbackback to summary
public SecretKeyCallback(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.

Parameters
request:SecretKeyCallback.Request

Request object identifying the secret key, or null.

Method Detail

getKeyback to summary
public SecretKey getKey()

Used to obtain the secret key set within the Callback.

Returns:SecretKey

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

getRequestback to summary
public SecretKeyCallback.Request getRequest()

Used by the CallbackHandler to get the Request object which identifies the secret key to be returned.

Returns:SecretKeyCallback.Request

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.

setKeyback to summary
public void setKey(SecretKey key)

Used by the CallbackHandler to set the requested secret key within the Callback.

Parameters
key:SecretKey

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

jakarta.security.auth.message.callback back to summary

public Class SecretKeyCallback.AliasRequest

extends Object
implements Request
Class Inheritance
  • java.lang.Object
  • jakarta.security.auth.message.callback.SecretKeyCallback.AliasRequest
All Implemented Interfaces
jakarta.security.auth.message.callback.SecretKeyCallback.Request

Request type for secret keys that are identified using an alias.

Field Summary

Modifier and TypeField and Description
private String

Constructor Summary

AccessConstructor and Description
public
AliasRequest(String
Name identifier for the secret key, or null.
alias
)

Construct an AliasRequest with an alias.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The alias, or null.
getAlias
()

Get the alias.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aliasback to summary
private String alias

Constructor Detail

AliasRequestback to summary
public AliasRequest(String alias)

Construct an AliasRequest with an alias.

The alias is used to directly identify the secret key to be returned.

If the alias is null, the handler of the callback relies on its own default.

Parameters
alias:String

Name identifier for the secret key, or null.

Method Detail

getAliasback to summary
public String getAlias()

Get the alias.

Returns:String

The alias, or null.

jakarta.security.auth.message.callback back to summary

public Interface SecretKeyCallback.Request

Known Direct Implementers
jakarta.security.auth.message.callback.SecretKeyCallback.AliasRequest

Marker interface for secret key request types.