OSID Logo
OSID Specifications
authentication keys package
Version 3.0.0
Release Candidate Preview
Interfaceosid.authentication.keys.KeyAgencyAssignmentSession
Implementsosid.OsidSession
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
CompliancemandatoryThis 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.IdagencyIdthe Id of the Agency
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT agencyId is null
CompliancemandatoryThis 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.IdagencyIdthe Id of the Agency
Returnosid.id.IdListlist of assignable agency Ids
ErrorsNULL_ARGUMENT agencyId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis 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.IdagencyIdthe Id of the Agency
osid.id.IdkeyIdthe Id of the Key
Returnosid.id.IdListlist of assignable bin Ids
ErrorsNULL_ARGUMENT agencyId or keyId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignKeyToAgency
Description

Adds an existing Key to an Agency.

Parametersosid.id.IdkeyIdthe Id of the Key
osid.id.IdagencyIdthe 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_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignKeyFromAgency
Description

Removes an Key from an Agency.

Parametersosid.id.IdkeyIdthe Id of the Key
osid.id.IdagencyIdthe 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_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignKeyToAgency
Description

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

Parametersosid.id.IdkeyIdthe Id of the Key
osid.id.IdfromAgencyIdthe Id of the current Agency
osid.id.IdtoAgencyIdthe Id of the destination Agency
ErrorsNOT_FOUND keyId, fromAgencyId, or toAgencyId not found or keyId not mapped to fromAgencyId
NULL_ARGUMENT keyId, fromAgencyId, or toAgencyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.