Examples of AuthenticationRequest


Examples of com.atlauncher.data.mojang.auth.AuthenticationRequest

    public static AuthenticationResponse checkAccount(String username, String password, String clientToken) {
        try {
            URL url = new URL("https://authserver.mojang.com/authenticate");
            String request;
            if (clientToken == null) {
                request = Gsons.DEFAULT.toJson(new AuthenticationRequest(username, password));
            } else {
                request = Gsons.DEFAULT.toJson(new AuthenticationRequest(username, password, clientToken));
            }
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            connection.setConnectTimeout(15000);
            connection.setReadTimeout(15000);
            connection.setRequestMethod("POST");
View Full Code Here

Examples of com.hazelcast.client.AuthenticationRequest

    }

    private Object authenticate(ClientConnection connection, Credentials credentials, ClientPrincipal principal,
                                boolean reAuth, boolean firstConnection) throws IOException {
        final SerializationService ss = getSerializationService();
        AuthenticationRequest auth = new AuthenticationRequest(credentials, principal);
        connection.init();
        auth.setReAuth(reAuth);
        auth.setFirstConnection(firstConnection);
        SerializableCollection collectionWrapper; //contains remoteAddress and principal
        try {
            collectionWrapper = (SerializableCollection) sendAndReceive(auth, connection);
        } catch (Exception e) {
            throw new RetryableIOException(e);
View Full Code Here

Examples of com.hazelcast.client.impl.client.AuthenticationRequest

    public void auth() throws IOException {
        //we need to call this so that the endpoint is created for the connection. Normally this is done from
        //the ConnectionManager.
        clientEngine.getConnectionListener().connectionAdded(connection);
        AuthenticationRequest auth = new AuthenticationRequest(new UsernamePasswordCredentials("dev", "dev-pass"));
        auth.setOwnerConnection(true);
        send(auth);
        receive();
    }
View Full Code Here

Examples of com.nimbusds.openid.connect.sdk.AuthenticationRequest

      // Merge params from request object
      finalParams.putAll(requestObjectParams);


      // Parse again
      AuthenticationRequest finalAuthRequest;

      try {
        finalAuthRequest = AuthenticationRequest.parse(request.getEndpointURI(), finalParams);

      } catch (ParseException e) {

        throw new ResolveException("Couldn't create final OpenID Connect authentication request: " + e.getMessage(), e);
      }
     
      return new AuthenticationRequest(
        finalAuthRequest.getEndpointURI(),
        finalAuthRequest.getResponseType(),
        finalAuthRequest.getScope(),
        finalAuthRequest.getClientID(),
        finalAuthRequest.getRedirectionURI(),
        finalAuthRequest.getState(),
        finalAuthRequest.getNonce(),
        finalAuthRequest.getDisplay(),
        finalAuthRequest.getPrompt(),
        finalAuthRequest.getMaxAge(),
        finalAuthRequest.getUILocales(),
        finalAuthRequest.getClaimsLocales(),
        finalAuthRequest.getIDTokenHint(),
        finalAuthRequest.getLoginHint(),
        finalAuthRequest.getACRValues(),
        finalAuthRequest.getClaims(),
        null, // request object
        null); // request URI
     
    } catch (ResolveException e) {
     
View Full Code Here

Examples of com.stormpath.sdk.authc.AuthenticationRequest

            try {

                // For authentication the only thing we need to do is call Application.authenticate(),
                // instantiating the proper AuthenticationRequest (UsernamePasswordRequest in this case),
                // providing the account's credentials.
                AuthenticationRequest request = new UsernamePasswordRequest(customer.getUserName(), customer.getPassword());
                AuthenticationResult authcResult = stormpath.getApplication().authenticateAccount(request);

                Account account = authcResult.getAccount();

                User user = new User(account);
View Full Code Here

Examples of cu.authentication.AuthenticationRequest

        if (username == null || "".equals(username)) {
            respond("500 please provide a username.");
        } else if (!username.matches("[\\w-]+")) {
            respond("500 Username contains illegal characters.");
        } else {
            auth = new AuthenticationRequest(username, ident, clientHost);
            respond("331 Password required for " + username);
        }
       
    }
View Full Code Here

Examples of org.apache.cassandra.thrift.AuthenticationRequest

        if (ConfigHelper.getInputKeyspaceUserName(conf) != null)
        {
            Map<String, String> creds = new HashMap<String, String>();
            creds.put(IAuthenticator.USERNAME_KEY, ConfigHelper.getInputKeyspaceUserName(conf));
            creds.put(IAuthenticator.PASSWORD_KEY, ConfigHelper.getInputKeyspacePassword(conf));
            AuthenticationRequest authRequest = new AuthenticationRequest(creds);
            client.login(authRequest);
        }
        logger.debug("Authenticated client for CF input format created successfully");
        return client;
    }
View Full Code Here

Examples of org.apache.cassandra.thrift.AuthenticationRequest

        // TODO how to 'timeout' on this op when underlying pool is exhausted
        client =  getClientFromLBPolicy(excludeHosts);
        Cassandra.Client c = client.getCassandra(op.keyspaceName);
        // Keyspace can be null for some system_* api calls
        if ( !op.credentials.isEmpty() ) {
          c.login(new AuthenticationRequest(op.credentials));
        }

        op.executeAndSetResult(c, client.cassandraHost);
        success = true;
        stopWatch.stop(op.stopWatchTagName + ".success_");
View Full Code Here

Examples of org.apache.cassandra.thrift.AuthenticationRequest

        if (ConfigHelper.getOutputKeyspaceUserName(conf) != null)
        {
            Map<String, String> creds = new HashMap<String, String>();
            creds.put(SimpleAuthenticator.USERNAME_KEY, ConfigHelper.getOutputKeyspaceUserName(conf));
            creds.put(SimpleAuthenticator.PASSWORD_KEY, ConfigHelper.getOutputKeyspacePassword(conf));
            AuthenticationRequest authRequest = new AuthenticationRequest(creds);
            client.login(authRequest);
        }
        return client;
    }
View Full Code Here

Examples of org.apache.cassandra.thrift.AuthenticationRequest

        if (ConfigHelper.getInputKeyspaceUserName(conf) != null)
        {
            Map<String, String> creds = new HashMap<String, String>();
            creds.put(IAuthenticator.USERNAME_KEY, ConfigHelper.getInputKeyspaceUserName(conf));
            creds.put(IAuthenticator.PASSWORD_KEY, ConfigHelper.getInputKeyspacePassword(conf));
            AuthenticationRequest authRequest = new AuthenticationRequest(creds);
            client.login(authRequest);
        }
        logger.debug("Authenticated client for CF input format created successfully");
        return client;
    }
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.