OSID Logo
OSID Specifications
authentication package
Version 3.1.0
Interfaceosid.authentication.AgentLookupSession
Implementsosid.OsidSession
Used Byosid.authentication.AuthenticationManager
osid.authentication.AuthenticationProxyManager
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.Id the Agency Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetAgency
Description

Gets the Agency associated with this session.

Returnosid.authentication.Agency the Agency associated with this session
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.

Compliancemandatory This 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.

Compliancemandatory This 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.

Compliancemandatory This method is must be implemented.
MethoduseIsolatedAgencyView
Description

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

Compliancemandatory This 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.IdagentId the Id of an Agent
Returnosid.authentication.Agent the returned Agent
ErrorsNOT_FOUND no Agent found with the given Id
NULL_ARGUMENT agentId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdListagentIds a list of agent Ids
Returnosid.authentication.AgentList the returned Agent list
ErrorsNOT_FOUND an Id was not found
NULL_ARGUMENT agentIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.TypeagentGenusType an agent genus type
Returnosid.authentication.AgentList the returned Agent list
ErrorsNULL_ARGUMENT agentGenusType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.TypeagentGenusType an agent genus type
Returnosid.authentication.AgentList the returned Agent list
ErrorsNULL_ARGUMENT agentGenusType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.TypeagentRecordType an agent record type
Returnosid.authentication.AgentList the returned Agent list
ErrorsNULL_ARGUMENT agentRecordType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.AgentList a list of Agents
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.