Objects¶
Authentication¶
-
class
dlkit.authentication_process.objects.Authentication¶ Bases:
dlkit.osid.objects.OsidObjectAuthenticationrepresents an authentication credential which contains set ofbytesand a format Type.Once an
Authenticationis created from theAuthenticationValidationSession,the credential data can be extracted and sent to the remote peer for validation. The remote peer gets anotherAuthenticationobject as a result of validating the serialized credential data.An
Authenticationmay or may not be valid.is_valid()should be checked before acting upon theAgentidentity to which the credential is mapped.-
agent_id¶ Gets the
Idof theAgentidentified in this authentication credential.Returns: the Agent IdReturn type: osid.id.Idcompliance: mandatory – This method must be implemented. implementation notes: The Agent should be determined at the time this credential is created.
-
agent¶ Gets the
Agentidentified in this authentication credential.Returns: the AgentReturn type: osid.authentication.AgentRaise: OperationFailed– unable to complete requestcompliance: mandatory – This method must be implemented.
-
is_valid()¶ Tests whether or not the credential represented by this
Authenticationis currently valid.A credential may be invalid because it has been destroyed, expired, or is somehow no longer able to be used.
Returns: trueif this authentication credential is valid,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented. implementation notes: Any problem in determining the validity of this credential should result in
false.
-
has_expiration()¶ Tests if this authentication has an expiration.
Returns: trueif this authentication has an expiration,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
expiration¶ Gets the expiration date associated with this authentication credential.
Consumers should check for the existence of a an expiration mechanism via
hasExpiration().Returns: the expiration date of this authentication credential Return type: timestampRaise: IllegalState–has_expiration()isfalsecompliance: mandatory – This method must be implemented.
-
has_credential()¶ Tests if this authentication has a credential for export.
Returns: trueif this authentication has a credential,falseotherwiseReturn type: booleancompliance: mandatory – This method must be implemented.
-
get_credential(credential_type)¶ Gets the credential represented by the given
Typefor transport to a remote service.Parameters: credential_type ( osid.type.Type) – the credential formatTypeReturns: the credential Return type: objectRaise: IllegalState–has_credential()isfalseRaise: NullArgument–credential_typeisnullRaise: Unsupported– the givencredential_typeis not supportedcompliance: mandatory – This method must be implemented. implementation notes: A provider may support multiple credential formats for a variety of applications.
-
get_authentication_record(authentication_record_type)¶ Gets the authentication record corresponding to the given authentication record
Type.This method is used to retrieve an object implementing the requested record. The
authentication_record_typemay be theTypereturned inget_record_types()or any of its parents in aTypehierarchy wherehas_record_type(authentication_record_type)istrue.Parameters: authentication_record_type ( osid.type.Type) – the type of authentication record to retrieveReturns: the authentication record Return type: osid.authentication.process.records.AuthenticationRecordRaise: NullArgument–authentication_record_typeisnullRaise: OperationFailed– unable to complete requestRaise: PermissionDenied– authorization failure occurredRaise: Unsupported–has_record_type(authenticaton_record_type)isfalsecompliance: mandatory – This method must be implemented.
-