Interface | osid.authentication.keys.KeyAdminSession | ||
---|---|---|---|
Implements | osid.OsidSession | ||
Description |
This session provides methods to creating, updating and
deleting | ||
Method | getAgencyId | ||
Description |
Gets the | ||
Return | osid.id.Id | the Agency Id associated with this session | |
Compliance | mandatory | This method must be implemented. | |
Method | getAgency | ||
Description |
Gets the | ||
Return | osid.authentication.Agency | the Agency associated with this session | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canCreateKeys | ||
Description |
Tests if this user can create | ||
Return | boolean | false if Key creation is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | canCreateKeyWithRecordTypes | ||
Description |
Tests if this user can create a single | ||
Parameters | osid.type.Type[] | keyRecordTypes | array of key record types |
Return | boolean | true if Key creation using the specified
record Types is supported, false otherwise | |
Errors | NULL_ARGUMENT | keyRecordTypes is null | |
Compliance | mandatory | This method must be implemented. | |
Method | getKeyFormForCreate | ||
Description |
Gets the key form for creating and updating new keys. A new form should be requested for each create transaction. | ||
Parameters | osid.id.Id | agentId | the Id of the Agent |
osid.type.Type[] | keyRecordTypes | array of key record types | |
Return | osid.authentication.keys.KeyForm | the key form | |
Errors | NOT_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 | ||
Compliance | mandatory | This method must be implemented. | |
Method | createKey | ||
Description |
Creates a new | ||
Parameters | osid.authentication.keys.KeyForm | keyForm | the form for this Key |
Return | osid.authentication.keys.Key | keyForm already used in a create transaction | |
Errors | ILLEGAL_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()
| ||
Compliance | mandatory | This method must be implemented. | |
Method | canUpdateKeys | ||
Description |
Tests if this user can update | ||
Return | boolean | false if key modification is not authorized, true
otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | getKeyFormForUpdate | ||
Description |
Gets the key form for updating an existing key. | ||
Parameters | osid.id.Id | keyId | the Id of the Key |
Return | osid.authentication.keys.KeyForm | the key form | |
Errors | NOT_FOUND | keyId is not found | |
NULL_ARGUMENT | keyId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | updateKey | ||
Description |
Updates a key for an agent. | ||
Parameters | osid.authentication.keys.KeyForm | keyForm | the form containing the elements to be updated |
Errors | ILLEGAL_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()
| ||
Compliance | mandatory | This method must be implemented. | |
Method | canDeleteKeys | ||
Description |
Tests if this user can delete | ||
Return | boolean | false if Key deletion is not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | deleteKey | ||
Description |
Deletes a | ||
Parameters | osid.id.Id | keyId | the Id of the Key |
Errors | NOT_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 | ||
Compliance | mandatory | This method must be implemented. |