Class HarmoniAuthenticationManager

Description

<p> AuthenticationManager:

  • gets authentication Types supported by the implementation,
  • authenticates the user using a particular authentication Type,
  • determines if the user is authenticated for a particular authentication Type,
  • destroys the user's authentication,
  • returns the Id of the Agent that represents the user.
</p>

<p> All implementations of OsidManager (manager) provide methods for accessing and manipulating the various objects defined in the OSID package. A manager defines an implementation of an OSID. All other OSID objects come either directly or indirectly from the manager. New instances of the OSID objects are created either directly or indirectly by the manager. Because the OSID objects are defined using interfaces, create methods must be used instead of the new operator to create instances of the OSID objects. Create methods are used both to instantiate and persist OSID objects. Using the OsidManager class to define an OSID's implementation allows the application to change OSID implementations by changing the OsidManager package name used to load an implementation. Applications developed using managers permit OSID implementation substitution without changing the application source code. As with all managers, use the OsidLoader to load an implementation of this interface. </p>

<p></p>

<p> OSID Version: 2.0 </p>

  • version: $Id: HarmoniAuthenticationManager.class.php,v 1.28 2007/09/04 20:25:37 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright &copy; 2005, Middlebury College

Located in /harmoni/core/oki2/authentication/HarmoniAuthenticationManager.class.php (line 69)

OsidManager
   |
   --AuthenticationManager
      |
      --HarmoniAuthenticationManager
Method Summary
void assignConfiguration (object Properties $configuration)
void assignOsidContext (mixed $context, object OsidContext $context )
void authenticateUser (mixed $authenticationType, object Type $authenticationType )
void destroyAuthenticationForType (mixed $authenticationType, object Type $authenticationType )
object TypeIterator getAuthenticationTypes ()
object Id. getFirstUserId ()
object OsidContext getOsidContext ()
object Id getUserId (mixed $authenticationType, object Type $authenticationType )
boolean isUserAuthenticated (mixed $authenticationType, object Type $authenticationType )
boolean _authenticateAdminActAsUserForType (<##> $authenticationType)
void _checkType (object Type $type)
object Id _getAgentIdForAuthNTokens (object AuthNTokens $authNTokens, object Type $authenticationType)
object AuthNTokens _getAuthNTokensFromUser (object Type $authenticationType)
string _getTypeString (object Type $type)
Methods
Constructor HarmoniAuthenticationManager (line 77)

Constructor. Ititializes the availible AuthenticationTypes and results.

void HarmoniAuthenticationManager ()
assignConfiguration (line 138)

Assign the configuration of this Manager. Valid configuration options are as

follows: token_collectors (array) An array in which the keys are the serialized Type objects that correspond to AuthenticationTypes and the values are the TokenCollector objects to be used fot that AuthenticationType.

  • access: public
  • throws: object OsidException An exception with one of the following messages defined in org.osid.OsidException: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT
void assignConfiguration (object Properties $configuration)
  • object Properties $configuration: (original type: java.util.Properties)

Redefinition of:
OsidManager::assignConfiguration()
Assign the configuration of this OsidManager.
assignOsidContext (line 111)

Assign the context of this OsidManager.

  • access: public
  • throws: object OsidException An exception with one of the following messages defined in org.osid.OsidException: NULL_ARGUMENT
void assignOsidContext (mixed $context, object OsidContext $context )
  • object OsidContext $context

Redefinition of:
OsidManager::assignOsidContext()
Assign the context of this OsidManager.
authenticateUser (line 223)

Invoke the authentication process of the specified Type to identify the

user. It may be necessary to call isUserAuthenticated to check the status of authentication. The standard authentication technique of limiting the time an user's authentication is valid requires explicit queries of the authentication status. It is likely that checking the status of authentication will occur more frequently than invoking the mechanism to authenticate the user. Separation of the authentication process from checking the status of the authentication process is made explicit by having the authenticateUser and isUserAuthenticated methods.

  • access: public
  • throws: object AuthenticationException An exception with one of the following messages defined in org.osid.authentication.AuthenticationException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_TYPE
void authenticateUser (mixed $authenticationType, object Type $authenticationType )
  • object Type $authenticationType

Redefinition of:
AuthenticationManager::authenticateUser()
Invoke the authentication process of the specified Type to identify the
destroyAuthentication (line 426)

Destroy authentication for all authentication types.

  • access: public
  • throws: object AuthenticationException An exception with one of the following messages defined in org.osid.authentication.AuthenticationException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
void destroyAuthentication ()

Redefinition of:
AuthenticationManager::destroyAuthentication()
Destroy authentication for all authentication types.
destroyAuthenticationForType (line 456)

Destroy authentication for the specified authentication type.

  • access: public
  • throws: object AuthenticationException An exception with one of the following messages defined in org.osid.authentication.AuthenticationException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_TYPE
void destroyAuthenticationForType (mixed $authenticationType, object Type $authenticationType )
  • object Type $authenticationType

Redefinition of:
AuthenticationManager::destroyAuthenticationForType()
Destroy authentication for the specified authentication type.
getAuthenticationTypes (line 180)

Get the authentication Types that are supported by the implementation.

  • access: public
  • throws: object AuthenticationException An exception with one of the following messages defined in org.osid.authentication.AuthenticationException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED
object TypeIterator getAuthenticationTypes ()

Redefinition of:
AuthenticationManager::getAuthenticationTypes()
Get the authentication Types that are supported by the implementation.
getFirstUserId (line 394)

Answer the first authenticated Id found for the current user or anonymous if none is found.

WARNING: NOT IN OSID

  • since: 7/26/07
  • access: public
object Id. getFirstUserId ()
getOsidContext (line 96)

Return context of this OsidManager.

  • access: public
  • throws: object OsidException
object OsidContext getOsidContext ()

Redefinition of:
OsidManager::getOsidContext()
Return context of this OsidManager.
getUserId (line 349)

Get the unique Id of the Agent that represents the user for the specified AuthenticationType. Agents are managed using the Agent OSID.

  • access: public
  • throws: object AuthenticationException An exception with one of the following messages defined in org.osid.authentication.AuthenticationException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_TYPE
object Id getUserId (mixed $authenticationType, object Type $authenticationType )
  • object Type $authenticationType

Redefinition of:
AuthenticationManager::getUserId()
Get the unique Id of the Agent that represents the user for the specified AuthenticationType. Agents are managed using the Agent OSID.
isUserAuthenticated (line 310)

Check the current authentication status of the user. If the method returns true, the user is authenticated. If the method returns false, the user is not authenticated. This can indicate that the user could not be authenticated or that the user's authentication has timed out.

The intent is to use the method authenticateUser to invoke the authentication process. The standard authentication technique of limiting the time an user's authentication is valid requires explicit queries of the authentication status. It is likely that checking the status of authentication will occur more frequently than invoking the mechanism to authenticate the user. Separation of the authentication process from checking the status of the authentication process is made explicit by having the authenticateUser and isUserAuthenticated methods.

  • access: public
  • throws: object AuthenticationException An exception with one of the following messages defined in org.osid.authentication.AuthenticationException may be thrown: OPERATION_FAILED, PERMISSION_DENIED, CONFIGURATION_ERROR, UNIMPLEMENTED, NULL_ARGUMENT, UNKNOWN_TYPE
boolean isUserAuthenticated (mixed $authenticationType, object Type $authenticationType )
  • object Type $authenticationType

Redefinition of:
AuthenticationManager::isUserAuthenticated()
Check the current authentication status of the user. If the method returns true, the user is authenticated. If the method returns false, the user is not authenticated. This can indicate that the user could not be authenticated or that the user's authentication has timed out.
isUserAuthenticatedWithAnyType (line 375)

Answer true if the current user is authenticated with any authentication type.

WARNING: NOT IN OSID

  • since: 7/26/07
  • access: public
boolean isUserAuthenticatedWithAnyType ()
_authenticateAdminActAsUser (line 594)

Log out the current user if they have authorization to act as other users, and log them in as the new user, setting a session identifier to add to the logs.

  • since: 12/11/06
  • access: public
<##> _authenticateAdminActAsUser (<##> 0)
  • <##> 0
_authenticateAdminActAsUserForType (line 657)

Log in a user if the username matches, but without checking the password, as part of the admin-act-as process

  • return: TRUE if tokens are valid.
  • since: 12/11/06
  • access: public
boolean _authenticateAdminActAsUserForType (<##> $authenticationType)
  • <##> $authenticationType
_checkType (line 476)

Validate the type passed to ensure that it is one of our supported ones.

An error will be thrown if the type is invalid.

  • since: 3/15/05
  • access: private
void _checkType (object Type $type)
  • object Type $type
_getAgentIdForAuthNTokens (line 519)

Get the AgentId that corresponds to the AuthNTokens passed and AuthNType.

If no Agent is currently mapped to the AuthNTokens, create a new Agent and map it to the tokens.

  • since: 3/15/05
  • access: protected
object Id _getAgentIdForAuthNTokens (object AuthNTokens $authNTokens, object Type $authenticationType)
_getAuthNTokensFromUser (line 556)

Prompt the user for their authentication tokens and recieve the responce.

  • since: 3/15/05
  • access: private
object AuthNTokens _getAuthNTokensFromUser (object Type $authenticationType)
  • object Type $authenticationType
_getTypeString (line 501)

Return a string version of a type.

  • since: 3/15/05
  • access: private
string _getTypeString (object Type $type)
  • object Type $type

Inherited Methods

Inherited From AuthenticationManager

AuthenticationManager::authenticateUser()
AuthenticationManager::destroyAuthentication()
AuthenticationManager::destroyAuthenticationForType()
AuthenticationManager::getAuthenticationTypes()
AuthenticationManager::getUserId()
AuthenticationManager::isUserAuthenticated()

Inherited From OsidManager

OsidManager::assignConfiguration()
OsidManager::assignOsidContext()
OsidManager::getOsidContext()
OsidManager::osidVersion_2_0()

Documentation generated on Wed, 19 Sep 2007 10:23:45 -0400 by phpDocumentor 1.3.0RC3