Examples of Authenticator


Examples of org.platformlayer.auth.Authenticator

    out.project = in.getProjectId().getKey();
    List<String> trustKeys = in.getTrustKeys();
    if (trustKeys != null && !trustKeys.isEmpty()) {
      out.trustKeys = Joiner.on(",").join(trustKeys);
    }
    Authenticator authenticator = in.getAuthenticator();
    if (authenticator instanceof DirectAuthenticator) {
      DirectAuthenticator directAuthenticator = (DirectAuthenticator) authenticator;
      DirectAuthenticationToken token = directAuthenticator.getAuthenticationToken();
      out.secret = Secret.build(Hex.toHex(FathomdbCrypto.serialize(token.getSecret())));
      out.token = token.getToken();
View Full Code Here

Examples of org.platformlayer.auth.Authenticator

      throw new UnsupportedOperationException();
    }
  }

  private static PlatformLayerEndpointInfo rehydrateEndpoint(final EndpointRecord in) {
    final Authenticator authenticator;
    final String platformlayerBaseUrl = in.url;
    final ProjectId projectId = new ProjectId(in.project);
    final List<String> trustKeys;

    if (Strings.isNullOrEmpty(in.trustKeys)) {
View Full Code Here

Examples of org.platformlayer.auth.Authenticator

    String server = config.authenticationEndpoint;
    String username = config.username;
    String secret = config.secret;
    List<String> authTrustKeys = config.authTrustKeys;

    Authenticator authenticator = new PlatformlayerAuthenticator(httpStrategy, username, secret, server,
        authTrustKeys);
    ProjectId projectId = new ProjectId(project);

    return build(httpStrategy, config.platformlayerEndpoint, authenticator, projectId,
        config.platformlayerTrustKeys);
View Full Code Here

Examples of org.structr.core.auth.Authenticator

    }
  }

  public Authenticator getAuthenticator() {

    Authenticator authenticator = null;

    try {
      authenticator = (Authenticator) authenticatorClass.newInstance();
      authenticator.setUserAutoCreate(userAutoCreate, userClass);
      authenticator.setUserAutoLogin(userAutoLogin, userClass);

    } catch (Throwable t) {

      logger.log(Level.SEVERE, "Unable to instantiate authenticator {0}: {1}", new Object[] { authenticatorClass, t.getMessage() } );
    }
View Full Code Here

Examples of org.torquebox.security.auth.Authenticator

            } else {
                log.warn( "SecurityDomainService for " + domain + " already active" );
            }
            ServiceName serviceName = AuthServices.authenticationService( this.getApplicationName(), name );
            log.debug( "Deploying Authenticator: " + serviceName + " for security domain: " + domain );
            Authenticator authenticator = new Authenticator();
            authenticator.setAuthDomain( domain );
            ServiceBuilder<Authenticator> builder = phaseContext.getServiceTarget().addService( serviceName, authenticator );
            builder.setInitialMode( Mode.PASSIVE );
            this.authService = builder.install();
        }
    }
View Full Code Here

Examples of securesocial.core.authenticator.Authenticator

        return F.Promise.wrap(env.authenticatorService().fromRequest(ctx._requestHeader())).flatMap(
                new F.Function<Option<Authenticator>, F.Promise<Result>>() {
                    @Override
                    public F.Promise<Result> apply(Option<Authenticator> authenticatorOption) throws Throwable {
                        if (authenticatorOption.isDefined() && authenticatorOption.get().isValid()) {
                            final Authenticator authenticator = authenticatorOption.get();
                            Object user = authenticator.user();
                            if (authorizationInstance.isAuthorized(user, configuration.params())) {
                                return F.Promise.wrap(authenticator.touch()).flatMap(new F.Function<Authenticator, F.Promise<Result>>() {
                                    @Override
                                    public F.Promise<Result> apply(Authenticator touched) throws Throwable {
                                        ctx.args.put(SecureSocial.USER_KEY, touched.user());
                                        return F.Promise.wrap(touched.touching(ctx)).flatMap(new F.Function<scala.runtime.BoxedUnit, F.Promise<Result>>() {
                                            @Override
View Full Code Here

Examples of securesocial.core.authenticator.Authenticator

        return (F.Promise<Result>) F.Promise.wrap(env.authenticatorService().fromRequest(ctx._requestHeader())).flatMap(
        new F.Function<Option<Authenticator>, Promise<Result>>() {
            @Override
            public F.Promise<Result> apply(Option<Authenticator> authenticatorOption) throws Throwable {
                if (authenticatorOption.isDefined() && authenticatorOption.get().isValid()) {
                    Authenticator authenticator = authenticatorOption.get();
                    return F.Promise.wrap(authenticator.touch()).flatMap(new F.Function<Authenticator, Promise<Result>>() {
                        @Override
                        public Promise<Result> apply(Authenticator touched) throws Throwable {
                            ctx.args.put(SecureSocial.USER_KEY, touched.user());
                            return F.Promise.wrap(touched.touching(ctx)).flatMap(new F.Function<scala.runtime.BoxedUnit, Promise<Result>>() {
                                @Override
View Full Code Here

Examples of simpleserver.Authenticator

    super("login PLAYER PASSWORD", "Login using CustAuth.");
  }

  public void execute(Player player, String message) {

    Authenticator auth = player.getServer().authenticator;
    if (!allowUse(player, auth)) {
      return;
    }

    String[] arguments = extractArguments(message);

    if (arguments.length != 2) {
      player.addTMessage(Color.RED, "Wrong number of arguments!");
      return;
    }

    String userName = arguments[0];
    String password = arguments[1];

    if (player.getServer().playerList.findPlayerExact(userName) != null) {
      player.addTMessage(Color.RED, "Login failed! Player already in server.");
      return;
    }

    if (!auth.isRegistered(userName)) {
      player.addTMessage(Color.RED, "You are not registered!");
      player.addTMessage(Color.RED, "Use the %s command to register.", (commandPrefix() + "register"));
      return;
    }

    if (!auth.loginBanTimeOver(player)) {
      player.addTMessage(Color.RED, "You've to wait %s seconds before another try to login.", auth.leftBanTime(player));
      return;
    }

    if (auth.login(player, userName, password)) {
      player.addTMessage(Color.GRAY, "Login successfull!");
      player.addTMessage(Color.GRAY, "Please reconnect to the server within %s seconds to complete the CustAuth process.", Authenticator.REQUEST_EXPIRATION);
      player.setUsedAuthenticator(true);
      auth.unbanLogin(player);
    } else {
      player.addTMessage(Color.RED, "Login failed! Password missmatch.");
      auth.banLogin(player);
    }
  }
View Full Code Here

Examples of tifauv.jplop.core.auth.Authenticator

        return;
      }

      // OK, now we are sure we got all the required fields
      m_logger.info("Logon request for user [" + username + "].");
      Authenticator authn = new Authenticator(username, password);
      if (authn.authenticate()) {
        p_request.getSession().removeAttribute(CommonConstants.NICK_SESSION_ATTR);
        p_request.getSession().setAttribute(CommonConstants.USER_SESSION_ATTR, authn.getUser());
        getServletContext().getRequestDispatcher(SUCCESS_PAGE).forward(p_request, p_response);
      }
      else {
        m_logger.warn("Authentication failed for user [" + username + "].");
        p_request.setAttribute(CommonConstants.ERROR_REQUEST_ATTR, "L'authentification a échoué.");
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.