OSID Logo
OSID Specifications
authorization package
Version 3.1.0
Interfaceosid.authorization.Authorization
Implementsosid.OsidRelationship
Used Byosid.authorization.AuthorizationAdminSession
osid.authorization.AuthorizationList
osid.authorization.AuthorizationLookupSession
Description

An Authorization is a mapping among an actor, a Function and a Qualifier. This interface is not required for performing authorization checks but is used for examining and managing authorizations.

The actor of an authorization may be specified in a variety of forms.

  • Agent
  • Resource: all the Agents associated with a Resource for matching authorizations
  • Resource and Trust: all the Agents within a cicle of Trust are used

An explicit Authorization represents the mappings as they are directly managed in the AuthorizationAdminSession. Implicit authorizations may be retrieved which are authorizations inferred through the Function or Qualifier hierarchies. An implicit Authorization is one where isImplicit() is true and should not be used for modification as it is only available for auditing purposes.

An Authorization containing a Resource may also provide the associated Agent in a request for implicit authorizations or for all the authorizations, both explicit and implicit, for a given Agent.

MethodisImplicit
Description

Tests if this authorization is implicit.

Returnboolean true if this authorization is implicit, false otherwise
Compliancemandatory This method must be implemented.
MethodhasResource
Description

Tests if this authorization has a Resource.

Returnboolean true if this authorization has a Resource, false otherwise
Compliancemandatory This method must be implemented.
MethodgetResourceId
Description

Gets the resource Id for this authorization.

Returnosid.id.Id the Resource Id
ErrorsILLEGAL_STATE hasResource() is false
Compliancemandatory This method must be implemented.
MethodgetResource
Description

Gets the Resource for this authorization.

Returnosid.resource.Resource the Resource
ErrorsILLEGAL_STATE hasResource() is false
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodhasTrust
Description

Tests if this authorization has a Trust.

Returnboolean true if this authorization has a Trust, false otherwise
Compliancemandatory This method must be implemented.
MethodgetTrustId
Description

Gets the Trust Id for this authorization.

Returnosid.id.Id the trust Id
ErrorsILLEGAL_STATE hasTrust() is false
Compliancemandatory This method must be implemented.
MethodgetTrust
Description

Gets the Trust for this authorization.

Returnosid.authentication.process.Trust the Trust
ErrorsILLEGAL_STATE hasTrust() is false
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodhasAgent
Description

Tests if this authorization has an Agent .An implied authorization may have an Agent in addition to a specified Resource.

Returnboolean true if this authorization has an Agent, false otherwise
Compliancemandatory This method must be implemented.
MethodgetAgentId
Description

Gets the Agent Id for this authorization.

Returnosid.id.Id the Agent Id
ErrorsILLEGAL_STATE hasAgent() is false
Compliancemandatory This method must be implemented.
MethodgetAgent
Description

Gets the Agent for this authorization.

Returnosid.authentication.Agent the Agent
ErrorsILLEGAL_STATE hasAgent() is false
OPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetFunctionId
Description

Gets the Function Id for this authorization.

Returnosid.id.Id the function Id
Compliancemandatory This method must be implemented.
MethodgetFunction
Description

Gets the Function for this authorization.

Returnosid.authorization.Function the function
ErrorsOPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetQualifierId
Description

Gets the Qualifier Id for this authorization.

Returnosid.id.Id the qualifier Id
Compliancemandatory This method must be implemented.
MethodgetQualifier
Description

Gets the qualifier for this authorization.

Returnosid.authorization.Qualifier the qualifier
ErrorsOPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetAuthorizationRecord
Description

Gets the authorization record corresponding to the given Authorization record Type. This method is used to retrieve an object implementing the requested record. The authorizationRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(authorizationRecordType) is true.

Parametersosid.type.TypeauthorizationRecordType the type of the record to retrieve
Returnosid.authorization.records.AuthorizationRecord the authorization record
ErrorsNULL_ARGUMENT authorizationRecordType is null
OPERATION_FAILED unable to complete request
UNSUPPORTED hasRecordType(authorizationRecordType) is false
Compliancemandatory This method must be implemented.