Interface ContentProviderAuthenticationService

All Known Implementing Classes:

public interface ContentProviderAuthenticationService

Interface which allows a content provider to perform their own authentication actions.

If the subscription servlets (i.e. subscribe, unsubscribe, resume, and suspend) find a non-null user principal in the HTTP request, they will bypass the call to the authenticate(AuthenticationRequest) method, as it assumes that authentication was successfully performed beforehand via a container-managed security realm and the subscriber id was populated into the principal's name.

If the user principal in the HTTP request is found to be null, the authenticate(AuthenticationRequest) method will be called to obtain a subscriber principal with the subscriber id as the principal's name.

A default implementation is provided by the push SDK. However, it is the responsibility of the content provider to provide their own implementation of this interface if they wish to tie authentication in to their existing system.

See Also:

Method Summary
 SubscriberPrincipal authenticateSubscriber(BaseAuthenticationRequest baseAuthenticationRequest)
          Authenticates a subscriber with the content provider, based on the information passed in.

Method Detail


SubscriberPrincipal authenticateSubscriber(BaseAuthenticationRequest baseAuthenticationRequest)
                                           throws AuthenticationFailureException
Authenticates a subscriber with the content provider, based on the information passed in.

Important note: An implementation of this method should ONLY contain business logic relating to the authentication of a subscriber. It should not contain any form of subscription business logic.

baseAuthenticationRequest - object containing authentication information
a principal containing the results of a successful authentication
IllegalArgumentException - if any of the information passed in fails validation
AuthenticationFailureException - if authentication failed

Copyright © 2011 Research In Motion. All Rights Reserved.