blackboard.platform.integration.provider
Interface AuthenticationProvider

All Superinterfaces:
IntegrationProvider
All Known Implementing Classes:
AbstractAuthenticationProvider

public interface AuthenticationProvider
extends IntegrationProvider

Provides authentication federation/delegation support for external LMSs

Implementation of this provider is mandatory.

Since:
Bb 7.3

Nested Class Summary
 
Nested classes/interfaces inherited from interface blackboard.platform.integration.provider.IntegrationProvider
IntegrationProvider.ProviderType
 
Method Summary
 java.util.Set<Id> checkActivity(java.util.Set<Id> userIds)
          Used to confirm which user sessions have had recent activity on the external LMS.
 void flushCachedCredentials(Id userId)
          When this is called, the provider should clear any internally cached information about the specified user's session.
 java.util.Set<javax.servlet.http.Cookie> getCookies(Id userId)
          Deprecated. Since 9.1. Please implement the alternate getCookies(Id, String) method.

It is recommended that the provider maintain an internal cache of these cookies, as this method is called relatively often.

 java.util.Set<javax.servlet.http.Cookie> getCookies(Id userId, java.lang.String baseUrl)
          Requests updated cookies for the user's external LMS session.
 java.lang.String getSharedCookieDomain(Id userId)
          Determines the cookie domain shared by Academic Suite and the external LMS.
 boolean login(Id userId, java.lang.String password)
          Pass the user's password to the external LMS for validation.
 void logout(Id userId)
          Notifies the external LMS that a user has logged out of Academic Suite.
 void setCookies(Id userId, java.util.Set<javax.servlet.http.Cookie> cookies)
          Invoked by the integration framework when it detects any new cookies on the browser for the current integration.
 
Methods inherited from interface blackboard.platform.integration.provider.IntegrationProvider
initializeProvider
 

Method Detail

login

boolean login(Id userId,
              java.lang.String password)
              throws PasswordChangeRequiredException,
                     PasswordChangeForcedException
Pass the user's password to the external LMS for validation. The provider may optionally throw an exception if the user's password has expired (this implies that the authentication was successful).

Note that this method will only be called if the current integration is the user's primary integration. For secondary integrations, the first interaction between AuthenticationProvider and a user will be through getCookies(blackboard.persist.Id, String) when a user tries to access integration-specific content.

Parameters:
userId - Id of the current User
password - Password entered by the user.
Returns:
true if password is valid
Throws:
PasswordChangeRequiredException - Indicates that the password was valid but that it needs to be changed. Normally thrown when the current password has expired.
PasswordChangeForcedException - Indicates that the password was valid but that it needs to be changed. Normally thrown when passwords must be changed after the first login.

logout

void logout(Id userId)
Notifies the external LMS that a user has logged out of Academic Suite. The provider should use this notification to clear out any cached session data.

Academic Suite will handle revoking the user's current session cookies.

Parameters:
userId - Id of the current User

getCookies

@Deprecated
java.util.Set<javax.servlet.http.Cookie> getCookies(Id userId)
Deprecated. Since 9.1. Please implement the alternate getCookies(Id, String) method.

It is recommended that the provider maintain an internal cache of these cookies, as this method is called relatively often.

Requests updated cookies for the user's external LMS session. This will be called every time the user clicks on a link which takes them from Academic Suite to an LMS page. If the user's remote session has expired, a new session should be created automatically.

Parameters:
userId - Id of the current User

getCookies

java.util.Set<javax.servlet.http.Cookie> getCookies(Id userId,
                                                    java.lang.String baseUrl)
Requests updated cookies for the user's external LMS session. This will be called every time the user clicks on a link which takes them from Academic Suite to an LMS page. If the user's remote session has expired, a new session should be created automatically. NOTE that this method should be implemented as the preferred method over getCookies(Id) because this is the only way you can guarantee that you will have the correct return-url when sending users back into AS. Using the correct return url is mandatory to maintain session cookies and branding.

It is recommended that the provider maintain an internal cache of these cookies, as this method is called relatively often.

Parameters:
userId - Id of the current User
baseUrl - Current base url for the user's session - to be used for all callback URLs into AS

setCookies

void setCookies(Id userId,
                java.util.Set<javax.servlet.http.Cookie> cookies)
Invoked by the integration framework when it detects any new cookies on the browser for the current integration. The framework will only pass in cookies that match those returned by a call to the provider's getCookies(Id, String) method.

If the provider maintains an internal cache, it is recommended that the cache be updated with these new cookie values.

Parameters:
userId - Id of the current User
cookies - Updated cookies to store

checkActivity

java.util.Set<Id> checkActivity(java.util.Set<Id> userIds)
Used to confirm which user sessions have had recent activity on the external LMS. The result from this call should be the subset of the incoming user list that represents the active users. All users excluded from the returned list will be logged out of Academic Suite when their AS session expires.

If the remote LMS does not keep track of session state, you may return null here. When the user's Academic Suite session times out, they will be logged out automatically.

Parameters:
userIds - List of User Ids to check.
Returns:
A collection of users that are still active, or null if operation is not supported.

flushCachedCredentials

void flushCachedCredentials(Id userId)
When this is called, the provider should clear any internally cached information about the specified user's session.

Parameters:
userId - Id of the current User

getSharedCookieDomain

java.lang.String getSharedCookieDomain(Id userId)
Determines the cookie domain shared by Academic Suite and the external LMS. Only called if ContentSystemProvider is implemented.

Parameters:
userId - Id of the current User


Copyright © 2012 Blackboard, Inc. All Rights Reserved.