List of usage examples for org.apache.hadoop.hdfs.web.resources DelegationParam DelegationParam
public DelegationParam(final String str)
From source file:com.bigstep.datalake.DLFileSystem.java
License:Apache License
private Param<?, ?>[] getAuthParameters(final HttpOpParam.Op op) throws IOException { List<Param<?, ?>> authParams = Lists.newArrayList(); // Skip adding delegation token for token operations because these // operations require authentication. Token<?> token = null;// w ww. java 2s . c om if (!op.getRequireAuth()) { token = getDelegationToken(); } if (token != null) { authParams.add(new DelegationParam(token.encodeToUrlString())); } else { authParams.add(new UserParam(kerberosIdentity.getPrincipalShortName())); } return authParams.toArray(new Param<?, ?>[0]); }