Examples of PlatformlayerAuthenticationToken


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

Examples of org.platformlayer.auth.PlatformlayerAuthenticationToken

    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

Examples of org.platformlayer.auth.PlatformlayerAuthenticationToken

    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

Examples of org.platformlayer.auth.PlatformlayerAuthenticationToken

    this.token = token;
  }

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

Examples of org.platformlayer.auth.PlatformlayerAuthenticationToken

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

    return null;
  }
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.