Package org.platformlayer.auth

Examples of org.platformlayer.auth.PlatformlayerAuthenticationToken


    final String authToken = httpRequest.getHeader("X-Auth-Token");
    if (authToken != null) {
      creds = new AuthenticationCredentials() {
        @Override
        public AuthenticationToken getToken() {
          return new PlatformlayerAuthenticationToken(authToken);
        }
      };
    }

    if (creds == null) {
View Full Code Here


    if (username == null || privateKey == null || certificateChain == null) {
      throw new IllegalArgumentException();
    }

    // TODO: Cache auth tokens??
    PlatformlayerAuthenticationToken authToken = keystoneUserClient.authenticateWithCertificate(username,
        certificateChain, privateKey);

    return authToken;
  }
View Full Code Here

    passwordCredentials.setUsername(username);
    passwordCredentials.setPassword(password);

    // TODO: Cache auth tokens??
    AuthenticateResponse response = keystoneUserClient.authenticate(passwordCredentials);
    PlatformlayerAuthenticationToken authToken = new PlatformlayerAuthenticationToken(response.getAccess());

    return authToken;

    // // TODO: Cache decoded tokens?
    // KeystoneAuthentication auth = (KeystoneAuthentication) keystoneSystemClient.validate(
View Full Code Here

    this.token = token;
  }

  public PlatformLayerAuthenticationCredentials(String authToken) {
    super();
    this.token = new PlatformlayerAuthenticationToken(authToken);
  }
View Full Code Here

        certificateCredentials.setChallengeResponse(challengeResponse);
      } else {
        if (response == null || response.getAccess() == null) {
          return null;
        }
        return new PlatformlayerAuthenticationToken(response.getAccess());
      }
    }

    return null;
  }
View Full Code Here

TOP

Related Classes of org.platformlayer.auth.PlatformlayerAuthenticationToken

Copyright © 2018 www.massapicom. 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.