NAME
Kernel::System::Credential::Certificate – Certificate Credential
DESCRIPTION
This class takes care about handling Certificate web tokens.
SYNOPSIS
my $Certificate = Kernel::System::Certificate->new(
ID => 123, # optional, the database identifier
Name => 'MyCredentialEntry', # required, the name of the credential entry
ValidID => 1, # required, the valid identifier
CreateTime => '2021-09-09 08:00:00', # optional, timestamp of the create time (now if not provided)
CreateBy => 123, # optional, UserID of the creator (1 if not given)
ChangeTime => '2021-09-09 08:00:00', # optional, timestamp of the last change time (now if not provided)
ChangeBy => 123, # optional, UserID of the last modifier (1 if not given)
Config => {
},
);
# # Get or refresh access token / refresh token from resource owner.
# $Certificate->Refresh();
ATTRIBUTES
Certificate
Attribute that holds the Certificate for authentication.
CertificateKey
Attribute that holds the CertificateKey.
CertificateKeyPassword
Attribute that holds the CertificateKeyPassword.
METHODS
Verify()
Verifies if the related access token is present, valid and in a usable state.
my $State = $AuthCredential->Verify();
Returns
{
StateName => 'OK' # String representation of the state
UpdateNeeded => 0, # Indicator for a needed token update
ValidUntil => '2021-09-01 18:15:35',
}
Refresh
Performs needed operations to refresh the disk certificate data.
# Refresh authorization if needed (write certificate files).
my $Refreshed = $AuthCredential->Refresh();
# Force the authorization to refresh (write certificate files).
my $Refreshed = $AuthCredential->Refresh( Force => 1 );
Returns
1 - success
undef - in case of any error