org.apache.hadoop.fs.swift.auth.AuthenticationRequest Java Examples

The following examples show how to use org.apache.hadoop.fs.swift.auth.AuthenticationRequest. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SwiftRestClient.java    From hadoop with Apache License 2.0 5 votes vote down vote up
/**
 * Authenticate to Openstack Keystone
 * As well as returning the access token, the member fields {@link #token},
 * {@link #endpointURI} and {@link #objectLocationURI} are set up for re-use.
 * <p>
 * This method is re-entrant -if more than one thread attempts to authenticate
 * neither will block -but the field values with have those of the last caller.
 *
 * @return authenticated access token
 */
public AccessToken authenticate() throws IOException {
  final AuthenticationRequest authenticationRequest;
  if (useKeystoneAuthentication) {
    authenticationRequest = keystoneAuthRequest;
  } else {
    authenticationRequest = authRequest;
  }

  LOG.debug("started authentication");
  return perform("authentication",
                 authUri,
                 new AuthenticationPost(authenticationRequest));
}
 
Example #2
Source File: SwiftRestClient.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private StringRequestEntity getAuthenticationRequst(AuthenticationRequest authenticationRequest)
  throws IOException {
  final String data = JSONUtil.toJSON(new AuthenticationRequestWrapper(
          authenticationRequest));
  if (LOG.isDebugEnabled()) {
    LOG.debug("Authenticating with " + authenticationRequest);
  }
  return toJsonEntity(data);
}
 
Example #3
Source File: SwiftRestClient.java    From big-c with Apache License 2.0 5 votes vote down vote up
/**
 * Authenticate to Openstack Keystone
 * As well as returning the access token, the member fields {@link #token},
 * {@link #endpointURI} and {@link #objectLocationURI} are set up for re-use.
 * <p>
 * This method is re-entrant -if more than one thread attempts to authenticate
 * neither will block -but the field values with have those of the last caller.
 *
 * @return authenticated access token
 */
public AccessToken authenticate() throws IOException {
  final AuthenticationRequest authenticationRequest;
  if (useKeystoneAuthentication) {
    authenticationRequest = keystoneAuthRequest;
  } else {
    authenticationRequest = authRequest;
  }

  LOG.debug("started authentication");
  return perform("authentication",
                 authUri,
                 new AuthenticationPost(authenticationRequest));
}
 
Example #4
Source File: SwiftRestClient.java    From big-c with Apache License 2.0 5 votes vote down vote up
private StringRequestEntity getAuthenticationRequst(AuthenticationRequest authenticationRequest)
  throws IOException {
  final String data = JSONUtil.toJSON(new AuthenticationRequestWrapper(
          authenticationRequest));
  if (LOG.isDebugEnabled()) {
    LOG.debug("Authenticating with " + authenticationRequest);
  }
  return toJsonEntity(data);
}
 
Example #5
Source File: SwiftRestClient.java    From sahara-extra with Apache License 2.0 5 votes vote down vote up
/**
 * Authenticate to Openstack Keystone
 * As well as returning the access token, the member fields {@link #token},
 * {@link #endpointURI} and {@link #objectLocationURI} are set up for re-use.
 * <p/>
 * This method is re-entrant -if more than one thread attempts to authenticate
 * neither will block -but the field values with have those of the last caller.
 * <p/>
 *
 * @return authenticated access token
 */
public AccessToken authenticate() throws IOException {
  final AuthenticationRequest authenticationRequest;
  if (useKeystoneAuthentication) {
    authenticationRequest = keystoneAuthRequest;
  } else {
    authenticationRequest = authRequest;
  }

  LOG.debug("started authentication");
  return perform("authentication",
                 authUri,
                 new AuthenticationPost(authenticationRequest));
}
 
Example #6
Source File: SwiftRestClient.java    From sahara-extra with Apache License 2.0 5 votes vote down vote up
private StringRequestEntity getAuthenticationRequst(AuthenticationRequest authenticationRequest)
  throws IOException {
  final String data = JSONUtil.toJSON(new AuthenticationRequestWrapper(
          authenticationRequest));
  if (LOG.isDebugEnabled()) {
    LOG.debug("Authenticating with " + authenticationRequest);
  }
  return toJsonEntity(data);
}
 
Example #7
Source File: SwiftRestClient.java    From hadoop with Apache License 2.0 4 votes vote down vote up
private AuthenticationPost(AuthenticationRequest authenticationRequest) {
  this.authenticationRequest = authenticationRequest;
}
 
Example #8
Source File: SwiftRestClient.java    From big-c with Apache License 2.0 4 votes vote down vote up
private AuthenticationPost(AuthenticationRequest authenticationRequest) {
  this.authenticationRequest = authenticationRequest;
}
 
Example #9
Source File: SwiftRestClient.java    From sahara-extra with Apache License 2.0 4 votes vote down vote up
private AuthenticationPost(AuthenticationRequest authenticationRequest) {
  this.authenticationRequest = authenticationRequest;
}