OSID Logo
OSID Specifications
authentication package
Version 3.0.0
Release Candidate Preview
Interfaceosid.authentication.AgentLookupSession
Implementsosid.OsidSession
Description

This session provides methods for retrieving Agent objects. The Agent represents the authenticated entity. Agents generally map to resources although this isn't always the case.

This session defines two sets of views which offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete and ordered result set or is an error condition
  • isolated agency view: All agent methods in this session operate, retrieve and pertain to agents defined explicitly in the current agency. Using an isolated view is useful for managing agents with the AgentAdminSession.
  • federated agency view: All agent methods in this session operate, retrieve and pertain to all agents defined in this agency and any other agents implicitly available in this agency through agency inheritence.

Generally, the comparative view should be used for most applications as it permits operation even if there a particular element is inaccessible. For example, a hierarchy output can be plugged into a lookup method to retrieve all objects known to a hierarchy, but it may not be necessary to break execution if a node from the hierarchy no longer exists. However, some administrative applications may need to know whether it had retrieved an entire set of objects and may sacrifice some interoperability for the sake of precision.

Agents may have an additional records indicated by their respective record types. The record may not be accessed through a cast of the Agent.

MethodgetAgencyId
Description

Gets the Agency Id associated with this session.

Returnosid.id.Idthe Agency Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetAgency
Description

Gets the Agency associated with this session.

Returnosid.authentication.Agencythe Agency associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupAgents
Description

Tests if this user can perform Agent lookups. 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 lookup operations.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeAgentView
Description

The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryAgentView
Description

A complete view of the Agent returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedAgencyView
Description

Federates the view for methods in this session. A federated view will include agents in agencies which are children of this agency in the agency hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedAgencyView
Description

Isolates the view for methods in this session. An isolated view restricts lookups to this agency only.

CompliancemandatoryThis method is must be implemented.
MethodgetAgent
Description

Gets the Agent specified by its Id. In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Agent may have a different Id than requested, such as the case where a duplicate Id was assigned to an Agent and retained for compatibility.

Parametersosid.id.IdagentIdthe Id of an Agent
Returnosid.authentication.Agentthe returned Agent
ErrorsNOT_FOUNDno Agent found with the given Id
NULL_ARGUMENT agentId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAgentsByIds
Description

Gets an AgentList corresponding to the given IdList. In plenary mode, the returned list contains all of the agents specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Agents may be omitted from the list and may present the elements in any order including returning a unique set.

Parametersosid.id.IdListagentIdsa list of agent Ids
Returnosid.authentication.AgentListthe returned Agent list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT agentIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAgentsByGenusType
Description

Gets an AgentList corresponding to the given agent genus Type which does not include agents of genus types derived from the specified Type. In plenary mode, the returned list contains all known agents or an error results. Otherwise, the returned list may contain only those agents that are accessible through this session.

Parametersosid.type.TypeagentGenusTypean agent genus type
Returnosid.authentication.AgentListthe returned Agent list
ErrorsNULL_ARGUMENT agentGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAgentsByParentGenusType
Description

Gets an AgentList corresponding to the given agent genus Type and include any additional agents with genus types derived from the specified Type. In plenary mode, the returned list contains all known agents or an error results. Otherwise, the returned list may contain only those agents that are accessible through this session.

Parametersosid.type.TypeagentGenusTypean agent genus type
Returnosid.authentication.AgentListthe returned Agent list
ErrorsNULL_ARGUMENT agentGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAgentsByRecordType
Description

Gets an AgentList containing the given agent record Type. In plenary mode, the returned list contains all known agents or an error results. Otherwise, the returned list may contain only those agents that are accessible through this session.

Parametersosid.type.TypeagentRecordTypean agent record type
Returnosid.authentication.AgentListthe returned Agent list
ErrorsNULL_ARGUMENT agentRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAgents
Description

Gets all Agents. In plenary mode, the returned list contains all known agents or an error results. Otherwise, the returned list may contain only those agents that are accessible through this session.

Returnosid.authentication.AgentLista list of Agents
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.