OSID Logo
OSID Specifications
authentication process package
Version 3.0.0
Release Candidate Preview
Interfaceosid.authentication.process.Authentication
Implementsosid.OsidObject
Description

Authentication represents an authentication credential which contains set of bytes and a format Type. Once an Authentication is created from the AuthenticationValidationSession, the credential data can be extracted and sent to the remote peer for validation. The remote peer gets another Authentication object as a result of validating the serialized credential data.

An Authentication may or may not be valid. isValid() should be checked before acting upon the Agent identity to which the credential is mapped.

MethodgetAgentId
Description

Gets the Id of the Agent identified in this authentication credential.

Returnosid.id.Idthe Agent Id
CompliancemandatoryThis method must be implemented.
Provider Notes

The Agent should be determined at the time this credential is created.

MethodgetAgent
Description

Gets the Agent identified in this authentication credential.

Returnosid.authentication.Agentthe Agent
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodisValid
Description

Tests whether or not the credential represented by this Authentication is currently valid. A credential may be invalid because it has been destroyed, expired, or is somehow no longer able to be used.

Returnboolean true if this authentication credential is valid, false otherwise
CompliancemandatoryThis method must be implemented.
Provider Notes

Any problem in determining the validity of this credential should result in false.

MethodhasExpiration
Description

Tests if this authentication has an expiration.

Returnboolean true if this authentication has an expiration, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetExpiration
Description

Gets the expiration date associated with this authentication credential. Consumers should check for the existence of a an expiration mechanism via hasExpiration().

Returntimestampthe expiration date of this authentication credential
ErrorsILLEGAL_STATE hasExpiration() is false
CompliancemandatoryThis method must be implemented.
MethodhasCredential
Description

Tests if this authentication has a credential for export.

Returnboolean true if this authentication has a credential, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetCredential
Description

Gets the credential represented by the given Type for transport to a remote service.

Parametersosid.type.TypecredentialTypethe credential format Type
Returnobjectthe credential
ErrorsILLEGAL_STATE hasCredential() is false
NULL_ARGUMENT credentialType is null
UNSUPPORTEDthe given credentialType is not supported
CompliancemandatoryThis method must be implemented.
Provider Notes

A provider may support multiple credential formats for a variety of applications.

MethodgetAuthenticationRecord
Description

Gets the authentication record corresponding to the given authentication record Type. This method is used to retrieve an object implementing the requested record. The authenticationRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(authenticationRecordType) is true .

Parametersosid.type.TypeauthenticationRecordTypethe type of authentication record to retrieve
Returnosid.authentication.process.records.AuthenticationRecordthe authentication record
ErrorsNULL_ARGUMENT authenticationRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
UNSUPPORTED hasRecordType(authenticatonRecordType) is false
CompliancemandatoryThis method must be implemented.