fr.cnes.sitools.security.authentication
Class AuthenticatorFactory

java.lang.Object
  extended by fr.cnes.sitools.security.authentication.AuthenticatorFactory

public final class AuthenticatorFactory
extends java.lang.Object

Class utility for managing Authenticators by domain Sitools V1: One domain ("SITOOLS") and One strategy (BASIC) Usage : Un authenticator est créé avec un verifier pour user+password Objectifs : 1. Initialiser tous les authenticators conformément à la stratégie de sécurité définie (schema BASIC / DIGEST) 2. Rafraichir globalement tous les authenticators si la stratégie est modifiée.

Author:
jp.boignard (AKKA Technologies)

Method Summary
static org.restlet.security.ChallengeAuthenticator getAuthenticator(org.restlet.Context context, boolean optional, java.lang.String realm, SitoolsRealm sitoolsRealm)
          Gets new Authenticator with scheme realm verifier enroler
static org.restlet.security.Authenticator getBasicAuthenticator(org.restlet.Context context, java.lang.String user, java.lang.String password, java.lang.String domain)
          Gets new Basic Restlet Authenticator with user + password + domain
static org.restlet.security.ChallengeAuthenticator getDigestAuthenticator(org.restlet.Context context, java.lang.String user, java.lang.String password, java.lang.String domain, java.lang.String secretKey)
          Gets new Digest Restlet Authenticator with user + password + domain + secret key
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBasicAuthenticator

public static org.restlet.security.Authenticator getBasicAuthenticator(org.restlet.Context context,
                                                                       java.lang.String user,
                                                                       java.lang.String password,
                                                                       java.lang.String domain)
Gets new Basic Restlet Authenticator with user + password + domain

Parameters:
context - Restlet Host Context
user - login
password - password
domain - realm
Returns:
Authenticator

getDigestAuthenticator

public static org.restlet.security.ChallengeAuthenticator getDigestAuthenticator(org.restlet.Context context,
                                                                                 java.lang.String user,
                                                                                 java.lang.String password,
                                                                                 java.lang.String domain,
                                                                                 java.lang.String secretKey)
Gets new Digest Restlet Authenticator with user + password + domain + secret key

Parameters:
context - Restlet Host Context
user - login
password - password
domain - realm
secretKey - server secret key
Returns:
Authenticator

getAuthenticator

public static org.restlet.security.ChallengeAuthenticator getAuthenticator(org.restlet.Context context,
                                                                           boolean optional,
                                                                           java.lang.String realm,
                                                                           SitoolsRealm sitoolsRealm)
Gets new Authenticator with scheme realm verifier enroler

Parameters:
context - the restlet context
optional - true if optional
realm - the realm
sitoolsRealm - SitoolsRealm
Returns:
ChallengeAuthenticator


Copyright © 2010-2013 CNES. All Rights Reserved.