OSID Logo
OSID Specifications
authorization package
Version 3.0.0
Release Candidate Preview
Interfaceosid.authorization.AuthorizationAdminSession
Implementsosid.OsidSession
Description

This session creates, updates, and deletes Authorizations. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create an Authorization, an AuthorizationForm is requested using getAuthorizationFormForCreate() specifying the desired relationship peers and record Types or none if no record Types are needed. The returned AuthorizationForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the AuthorizationForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each AuthorizationForm corresponds to an attempted transaction.

For updates, AuthorizationForms are requested to the Authorization Id that is to be updated using getAuthorizationFormForUpdate(). Similarly, the AuthorizationForm has metadata about the data that can be updated and it can perform validation before submitting the update. The AuthorizationForm can only be used once for a successful update and cannot be reused.

The delete operations delete Authorizations. To unmap an Authorization from the current Vault, the AuthorizationVaultAssignmentSession should be used. These delete operations attempt to remove the Authorization itself thus removing it from all known Vault catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

MethodgetVaultId
Description

Gets the Vault Id associated with this session.

Returnosid.id.Idthe Vault Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetVault
Description

Gets the Vault associated with this session.

Returnosid.authorization.Vaultthe Vault associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateAuthorizations
Description

Tests if this user can create Authorizations. A return of true does not guarantee successful authorization. A return of false indicates that it is known all 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 create operations to unauthorized users.

Returnboolean false if Authorization creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateAuthorizationWithRecordTypes
Description

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

Parametersosid.type.Type[]authorizationRecordTypesarray of authorization record types
Returnboolean true if Authorization creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT authorizationRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationFormForCreateForAgent
Description

Gets the authorization form for creating new authorizations. A new form should be requested for each create transaction.

Parametersosid.id.IdagentIdthe agent Id
osid.id.IdfunctionIdthe function Id
osid.id.IdqualifierIdthe qualifier Id
osid.type.Type[]authorizationRecordTypesarray of authorization record types
Returnosid.authorization.AuthorizationFormthe authorization form
ErrorsNOT_FOUND agentId, functionId or qualifierId is not found
NULL_ARGUMENT agentId, functionId, qualifierId or authorizationRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form with requested record types
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationFormForCreateForResource
Description

Gets the authorization form for creating new authorizations. A new form should be requested for each create transaction.

Parametersosid.id.IdresourceIdthe resource Id
osid.id.IdfunctionIdthe function Id
osid.id.IdqualifierIdthe qualifier Id
osid.type.Type[]authorizationRecordTypesarray of authorization record types
Returnosid.authorization.AuthorizationFormthe authorization form
ErrorsNOT_FOUND resourceId, functionId or qualifierId is not found
NULL_ARGUMENT resourceId, functionId, qualifierId, or authorizationRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form with requested record types
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationFormForCreateForResourceAndTrust
Description

Gets the authorization form for creating new authorizations. A new form should be requested for each create transaction.

Parametersosid.id.IdresourceIda resource Id
osid.id.IdtrustIdan Id for a circle of trust
osid.id.IdfunctionIda function Id
osid.id.IdqualifierIdthe qualifier Id
osid.type.Type[]authorizationRecordTypesarray of authorization record types
Returnosid.authorization.AuthorizationFormthe authorization form
ErrorsNOT_FOUND resourceId, trustId, functionId , or qualifierid is not found
NULL_ARGUMENT resourceId, trustId , resourceId, qualifierId or authorizationRecordTypes is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form with requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateAuthorization
Description

Creates a new explicit Authorization.

Parametersosid.authorization.AuthorizationFormauthorizationFormthe authorization form
Returnosid.authorization.Authorization t he new Authorization
ErrorsILLEGAL_STATE authorizationForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT authorizationForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED authorizationForm did not originate from this service
CompliancemandatoryThis method must be implemented.
MethodcanUpdateAuthorizations
Description

Tests if this user can update Authorizations. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an Authorization 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 authorization modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetAuthorizationFormForUpdate
Description

Gets the authorization form for updating an existing authorization. A new authorization form should be requested for each update transaction.

Parametersosid.id.IdauthorizationIdthe Id of the Authorization
Returnosid.authorization.AuthorizationFormthe authorization form
ErrorsNOT_FOUND authorizationId is not found
NULL_ARGUMENT authorizationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateAuthorization
Description

Updates an existing authorization

Parametersosid.authorization.AuthorizationFormauthorizationFormthe authorization Id
ErrorsILLEGAL_STATE authorizationForm already used in an update transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT authorizationForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED authorizationForm did not originate from getAuthorizationFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteAuthorizations
Description

Tests if this user can delete Authorizations. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Authorization 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 Authorization deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteAuthorization
Description

Deletes the Authorization identified by the given Id.

Parametersosid.id.IdauthorizationIdthe Id of the Authorization to delete
ErrorsNOT_FOUNDan Authorization was not found identified by the given Id
NULL_ARGUMENT authorizationId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageAuthorizationAliases
Description

Tests if this user can manage Id aliases for Authorizations. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Authorization aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasAuthorization
Description

Adds an Id to an Authorization for the purpose of creating compatibility. The primary Id of the Authorization is determined by the provider. The new Id performs as an alias to the primary Id. If the alias is a pointer to another authorization. it is reassigned to the given authorization Id.

Parametersosid.id.IdauthorizationIdthe Id of an Authorization
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND authorizationId not found
NULL_ARGUMENT authorizationId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.