Examples of Authenticator


Examples of org.apache.hadoop.security.authentication.client.Authenticator

   */
  private HttpURLConnection getConnection(URL url, String method) throws IOException {
    Class<? extends Authenticator> klass =
      getConf().getClass("httpfs.authenticator.class",
                         HttpFSKerberosAuthenticator.class, Authenticator.class);
    Authenticator authenticator = ReflectionUtils.newInstance(klass, getConf());
    try {
      HttpURLConnection conn = new AuthenticatedURL(authenticator).openConnection(url, authToken);
      conn.setRequestMethod(method);
      if (method.equals(HTTP_POST) || method.equals(HTTP_PUT)) {
        conn.setDoOutput(true);
View Full Code Here

Examples of org.apache.isis.core.integtestsupport.legacy.Authenticator

     * Note: an alternative design would be to have a 1-arg constructor, but the
     * convention for installers is to make them no-arg.
     */
    // {{ AuthenticationManagerInstaller
    public AuthenticationManagerInstaller addAuthenticatorAnnotatedOn(final Class<?> javaClass) throws InstantiationException, IllegalAccessException {
        final Authenticator authenticatorAnnotation = javaClass.getAnnotation(Authenticator.class);
        if (authenticatorAnnotation != null) {
            return addAuthenticatorRepresentedBy(authenticatorAnnotation);
        } else {
            return new BypassAuthenticationManagerInstaller();
        }
View Full Code Here

Examples of org.apache.isis.core.runtime.authentication.standard.Authenticator

     * The standard authentication manager, configured with the default authenticator (allows all requests through).
     */
    @Override
    protected AuthenticationManager obtainAuthenticationManager(DeploymentType deploymentType) throws IsisSystemException {
        final AuthenticationManagerStandard authenticationManager = new AuthenticationManagerStandard(getConfiguration());
        Authenticator authenticator = new AuthenticatorBypass(configuration);
        authenticationManager.addAuthenticator(authenticator);
        return authenticationManager;
    }
View Full Code Here

Examples of org.apache.isis.viewer.junit.Authenticator

     * Note: an alternative design would be to have a 1-arg constructor, but the
     * convention for installers is to make them no-arg.
     */
    // {{ AuthenticationManagerInstaller
    public AuthenticationManagerInstaller addAuthenticatorAnnotatedOn(final Class<?> javaClass) throws InstantiationException, IllegalAccessException {
        final Authenticator authenticatorAnnotation = javaClass.getAnnotation(Authenticator.class);
        if (authenticatorAnnotation != null) {
            return addAuthenticatorRepresentedBy(authenticatorAnnotation);
        } else {
            return new NoopAuthenticationManagerInstaller();
        }
View Full Code Here

Examples of org.apache.james.mailbox.store.Authenticator

     */
    private MailboxManager newInMemoryMailboxManager() {
   
        return new StoreMailboxManager<Long>(
            new InMemoryMailboxSessionMapperFactory(),
            new Authenticator() {
                public boolean isAuthentic(String userid, CharSequence passwd) {
                    return true;
                }
            });
   
View Full Code Here

Examples of org.apache.juddi.auth.Authenticator

    // aquire a jUDDI datastore instance
    DataStore dataStore = DataStoreFactory.getDataStore();

    // aquire a jUDDI Authenticator instance
    Authenticator authenticator = AuthenticatorFactory.getAuthenticator();

    try
    {
      // begin this transaction
      dataStore.beginTrans();

      // authenticate the requestor's credentials
      String publisherID = authenticator.authenticate(userID,cred);
      if (publisherID == null)
        throw new UnknownUserException("get_authToken: "+
            "userID="+userID);

      // ensure the user has the authority to publish
View Full Code Here

Examples of org.apache.juddi.v3.auth.Authenticator

   * @throws ConfigurationException
   */
  @Test
  public void testDefaultAuthenticator()
  {
    Authenticator auth = new JUDDIAuthenticator();
    try {
      API_010_PublisherTest api010 = new API_010_PublisherTest();
      api010.saveJoePublisher();
      api010.saveSamSyndicator();

      auth.authenticate("joepublisher","password");
      auth.authenticate("ssyndicator","badpass");
     
    } catch (Exception e) {
      logger.error(e.getMessage(),e);
      Assert.fail("unexpected");
    }
View Full Code Here

Examples of org.apache.juddi.v3.auth.Authenticator

   */
  @Test
  public void testXMLDocAuthenticator()
  {
    try {
      Authenticator auth = new XMLDocAuthenticator();
      auth.authenticate("anou_mana","password");
      auth.authenticate("bozo","clown");
      auth.authenticate("sviens","password");
    } catch (Exception e) {
      logger.error(e.getMessage(),e);
      Assert.fail("unexpected");
    }
  }
View Full Code Here

Examples of org.apache.juddi.v3.auth.Authenticator

   * @throws JAXBException
   */
  @Test(expected=UnknownUserException.class)
  public void testBadXMLDocAuthenticator() throws Exception
  {
    Authenticator auth = new XMLDocAuthenticator();
    auth.authenticate("anou_mana","badpass");
  }
View Full Code Here

Examples of org.apache.juddi.v3.auth.Authenticator

   */
  @Test
  public void testCryptedXMLDocAuthenticator()
  {
    try {
      Authenticator auth = new CryptedXMLDocAuthenticator();
      auth.authenticate("anou_mana","password");
      auth.authenticate("bozo","clown");
      auth.authenticate("sviens","password");
    } catch (Exception e) {
      logger.error(e.getMessage(),e);
      Assert.fail("unexpected");
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.