OSID Logo
OSID Specifications
authorization package
Version 3.0.0
Release Candidate Preview
Interfaceosid.authorization.Authorization
Implementsosid.OsidRelationship
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: the authorization provider uses all the Agents associated with a Resource for matching authorizations
  • Resource and Trust: the authorization provider uses the associated Agents within a cicle of Trust

An explicit Authorization represents the mappings as they are specified in the authorization provdier. 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
CompliancemandatoryThis method must be implemented.
MethodhasResource
Description

Tests if this authorization has a Resource.

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

Gets the resource Id for this authorization.

Returnosid.id.Idthe Resource Id
ErrorsILLEGAL_STATE hasResource() is false
CompliancemandatoryThis method must be implemented.
MethodgetResource
Description

Gets the Resource for this authorization.

Returnosid.resource.Resourcethe Resource
ErrorsILLEGAL_STATE hasResource() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodhasTrust
Description

Tests if this authorization has a Trust.

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

Gets the Trust Id for this authorization.

Returnosid.id.Idthe trust Id
ErrorsILLEGAL_STATE hasTrust() is false
CompliancemandatoryThis method must be implemented.
MethodgetTrust
Description

Gets the Trust for this authorization.

Returnosid.authentication.process.Trustthe Trust
ErrorsILLEGAL_STATE hasTrust() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis 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
CompliancemandatoryThis method must be implemented.
MethodgetAgentId
Description

Gets the Agent Id for this authorization.

Returnosid.id.Idthe Agent Id
ErrorsILLEGAL_STATE hasAgent() is false
CompliancemandatoryThis method must be implemented.
MethodgetAgent
Description

Gets the Agent for this authorization.

Returnosid.authentication.Agentthe Agent
ErrorsILLEGAL_STATE hasAgent() is false
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetFunctionId
Description

Gets the Function Id for this authorization.

Returnosid.id.Idthe function Id
CompliancemandatoryThis method must be implemented.
MethodgetFunction
Description

Gets the Function for this authorization.

Returnosid.authorization.Functionthe function
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetQualifierId
Description

Gets the Qualifier Id for this authorization.

Returnosid.id.Idthe qualifier Id
CompliancemandatoryThis method must be implemented.
MethodgetQualifier
Description

Gets the qualifier for this authorization.

Returnosid.authorization.Qualifierthe qualifier
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis 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.TypeauthorizationRecordTypethe type of the record to retrieve
Returnosid.authorization.records.AuthorizationRecordthe authorization record
ErrorsNULL_ARGUMENT authorizationRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(authorizationRecordType) is false
CompliancemandatoryThis method must be implemented.