Search in sources :

Example 11 with TAuthenticationTokenIdentifier

use of org.apache.accumulo.core.securityImpl.thrift.TAuthenticationTokenIdentifier in project accumulo by apache.

the class ThriftMessageUtilTest method setup.

@BeforeEach
public void setup() throws IOException {
    msg = new TAuthenticationTokenIdentifier("principal");
    util = new ThriftMessageUtil();
}
Also used : TAuthenticationTokenIdentifier(org.apache.accumulo.core.securityImpl.thrift.TAuthenticationTokenIdentifier) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 12 with TAuthenticationTokenIdentifier

use of org.apache.accumulo.core.securityImpl.thrift.TAuthenticationTokenIdentifier in project accumulo by apache.

the class AuthenticationTokenIdentifier method createTAuthIdentifier.

public static TAuthenticationTokenIdentifier createTAuthIdentifier(String principal, int keyId, long issueDate, long expirationDate, String instanceId) {
    TAuthenticationTokenIdentifier tIdentifier = new TAuthenticationTokenIdentifier(principal);
    tIdentifier.setKeyId(keyId);
    tIdentifier.setIssueDate(issueDate);
    tIdentifier.setExpirationDate(expirationDate);
    tIdentifier.setInstanceId(instanceId);
    return tIdentifier;
}
Also used : TAuthenticationTokenIdentifier(org.apache.accumulo.core.securityImpl.thrift.TAuthenticationTokenIdentifier)

Aggregations

TAuthenticationTokenIdentifier (org.apache.accumulo.core.securityImpl.thrift.TAuthenticationTokenIdentifier)12 Test (org.junit.jupiter.api.Test)8 AuthenticationTokenIdentifier (org.apache.accumulo.core.clientImpl.AuthenticationTokenIdentifier)7 ByteBuffer (java.nio.ByteBuffer)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 DataInputStream (java.io.DataInputStream)1 DataOutputStream (java.io.DataOutputStream)1 AccumuloException (org.apache.accumulo.core.client.AccumuloException)1 ThriftMessageUtil (org.apache.accumulo.core.util.ThriftMessageUtil)1 Text (org.apache.hadoop.io.Text)1 UserGroupInformation (org.apache.hadoop.security.UserGroupInformation)1 Token (org.apache.hadoop.security.token.Token)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1