OSID Logo
OSID Specifications
authentication keys package
Version 3.1.0
Interfaceosid.authentication.keys.KeyAdminSession
Implementsosid.OsidSession
Implemented Byosid.authentication.keys.batch.KeyBatchAdminSession
Used Byosid.authentication.keys.AuthenticationKeysManager
osid.authentication.keys.AuthenticationKeysProxyManager
Description

This session provides methods to creating, updating and deleting Key objects. Keys are managed separately from the Agent. Each Agent maps to a zero or one Key and every Key maps to one Agent.

MethodgetAgencyId
Description

Gets the Agency Id associated with this session.

Returnosid.id.Id the Agency Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetAgency
Description

Gets the Agency associated with this session.

Returnosid.authentication.Agency the Agency associated with this session
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanCreateKeys
Description

Tests if this user can create Keys. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Key will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Key creation is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanCreateKeyWithRecordTypes
Description

Tests if this user can create a single Key using the desired record interface types. While AuthenticationKeysManager.getKeyRecordTypes() can be used to examine which record interfaces are supported, this method tests which record(s) are required for creating a specific Key. Providing an empty array tests if a Key can be created with no records.

Parametersosid.type.Type[]keyRecordTypes array of key record types
Returnboolean true if Key creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT keyRecordTypes is null
Compliancemandatory This method must be implemented.
MethodgetKeyFormForCreate
Description

Gets the key form for creating and updating new keys. A new form should be requested for each create transaction.

Parametersosid.id.IdagentId the Id of the Agent
osid.type.Type[]keyRecordTypes array of key record types
Returnosid.authentication.keys.KeyForm the key form
ErrorsNOT_FOUND agentId is not found
NULL_ARGUMENT agentId or keyRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED unable to get form for requested record types
Compliancemandatory This method must be implemented.
MethodcreateKey
Description

Creates a new Key.

Parametersosid.authentication.keys.KeyFormkeyForm the form for this Key
Returnosid.authentication.keys.Key keyForm already used in a create transaction
ErrorsILLEGAL_STATE agent already has a key
INVALID_ARGUMENT one or more of the form elements is invalid
NULL_ARGUMENT keyForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED keyForm did not originate from getKeyFormForCreate()
Compliancemandatory This method must be implemented.
MethodcanUpdateKeys
Description

Tests if this user can update Keys. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Key will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if key modification is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodgetKeyFormForUpdate
Description

Gets the key form for updating an existing key.

Parametersosid.id.IdkeyId the Id of the Key
Returnosid.authentication.keys.KeyForm the key form
ErrorsNOT_FOUND keyId is not found
NULL_ARGUMENT keyId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodupdateKey
Description

Updates a key for an agent.

Parametersosid.authentication.keys.KeyFormkeyForm the form containing the elements to be updated
ErrorsILLEGAL_STATE keyForm already used in an update transaction
INVALID_ARGUMENT the form contains an invalid value
NULL_ARGUMENT keyForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED keyForm did not originate from getKeyFormForUpdate()
Compliancemandatory This method must be implemented.
MethodcanDeleteKeys
Description

Tests if this user can delete Keys. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Key will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Key deletion is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoddeleteKey
Description

Deletes a Key.

Parametersosid.id.IdkeyId the Id of the Key
ErrorsNOT_FOUND a Key was not found identified by the given Id
NULL_ARGUMENT keyId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.