Top Description Fields Constructors Methods
jakarta.security.enterprise.credential

public abstract Class AbstractClearableCredential

extends Object
implements Credential
Class Inheritance
All Implemented Interfaces
jakarta.security.enterprise.credential.Credential
Known Direct Subclasses
jakarta.security.enterprise.credential.UsernamePasswordCredential

AbstractClearableCredential contains behavior common to Credential implementations that can be meaningfully cleared.

Field Summary

Modifier and TypeField and Description
private volatile boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final void
clear()

Overrides default jakarta.security.enterprise.credential.Credential.clear.

Clears the credential.
protected abstract void
clearCredential()

Invokes the specific subclass to securely clear the credential value.

public final boolean
isCleared()

Overrides default jakarta.security.enterprise.credential.Credential.isCleared.

Determines whether the credential value has been securely cleared.
protected final void
setCleared()

Specifies that the credential value has been securely cleared.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clearedback to summary
private volatile boolean cleared

Constructor Detail

AbstractClearableCredentialback to summary
public AbstractClearableCredential()

Method Detail

clearback to summary
public final void clear()

Overrides default jakarta.security.enterprise.credential.Credential.clear.

Doc from jakarta.security.enterprise.credential.Credential.clear.

Clears the credential. For example, if the credential includes a password, this method would overwrite the password value.

Annotations
@Override
clearCredentialback to summary
protected abstract void clearCredential()

Invokes the specific subclass to securely clear the credential value. Some Credential subclasses contain credential values which are inherently secure, such as tokens, for which clearing the credential may not be necessary.

For example, if the credential includes a password, this method would overwrite the password value.

isClearedback to summary
public final boolean isCleared()

Overrides default jakarta.security.enterprise.credential.Credential.isCleared.

Doc from jakarta.security.enterprise.credential.Credential.isCleared.

Determines whether the credential value has been securely cleared.

Returns:boolean

true if the credential has been cleared, otherwise false.

Annotations
@Override
setClearedback to summary
protected final void setCleared()

Specifies that the credential value has been securely cleared.