OSID Logo
OSID Specifications
authentication keys package
Version 3.1.0
Interfaceosid.authentication.keys.KeyAgencyAssignmentSession
Implementsosid.OsidSession
Used Byosid.authentication.keys.AuthenticationKeysManager
osid.authentication.keys.AuthenticationKeysProxyManager
Description

This session provides methods to re-assign Keys to Agencies An Key may map to multiple Agency objects and removing the last reference to an Key is the equivalent of deleting it. Each Agency may have its own authorizations governing who is allowed to operate on it.

Moving or adding a reference of an Ageny to another Agency is not a copy operation (eg: does not change its Id).

MethodcanAssignKeys
Description

Tests if this user can alter key/agency mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodcanAssignKeysToAgency
Description

Tests if this user can alter key/agency mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.

Parametersosid.id.IdagencyId the Id of the Agency
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT agencyId is null
Compliancemandatory This method must be implemented.
MethodgetAssignableAgencyIds
Description

Gets a list of agencies including and under the given agency node in which any key can be assigned.

Parametersosid.id.IdagencyId the Id of the Agency
Returnosid.id.IdList list of assignable agency Ids
ErrorsNULL_ARGUMENT agencyId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetAssignableAgencyIdsForKey
Description

Gets a list of agencies including and under the given agency node in which a specific key can be assigned.

Parametersosid.id.IdagencyId the Id of the Agency
osid.id.IdkeyId the Id of the Key
Returnosid.id.IdList list of assignable bin Ids
ErrorsNULL_ARGUMENT agencyId or keyId is null
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodassignKeyToAgency
Description

Adds an existing Key to an Agency.

Parametersosid.id.IdkeyId the Id of the Key
osid.id.IdagencyId the Id of the Agency
ErrorsALREADY_EXISTS keyId is already assigned to agencyId
NOT_FOUND keyId or agencyId not found
NULL_ARGUMENT keyId or agencyId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignKeyFromAgency
Description

Removes an Key from an Agency.

Parametersosid.id.IdkeyId the Id of the Key
osid.id.IdagencyId the Id of the Agency
ErrorsNOT_FOUND keyId or agencyId not found or keyId not assigned to agencyId
NULL_ARGUMENT keyId or agencyId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodreassignKeyToAgency
Description

Moves a Key from one Agency to another. Mappings to other Agencies are unaffected.

Parametersosid.id.IdkeyId the Id of the Key
osid.id.IdfromAgencyId the Id of the current Agency
osid.id.IdtoAgencyId the Id of the destination Agency
ErrorsALREADY_EXISTS keyId already assigned to toAgencyId
NOT_FOUND keyId, fromAgencyId, or toAgencyId not found or keyId not mapped to fromAgencyId
NULL_ARGUMENT keyId, fromAgencyId, or toAgencyId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.