use of org.apache.accumulo.core.util.ThriftMessageUtil in project accumulo by apache.
the class AuthenticationTokenIdentifier method readFields.
@Override
public void readFields(DataInput in) throws IOException {
int length = in.readInt();
if (length > 0) {
ThriftMessageUtil msgUtil = new ThriftMessageUtil();
byte[] serialized = new byte[length];
in.readFully(serialized);
var tAuthTokenId = msgUtil.deserialize(serialized, new TAuthenticationTokenIdentifier());
populateFields(tAuthTokenId);
}
}
use of org.apache.accumulo.core.util.ThriftMessageUtil in project accumulo by apache.
the class AuthenticationTokenIdentifier method readFields.
@Override
public void readFields(DataInput in) throws IOException {
int length = in.readInt();
if (length > 0) {
ThriftMessageUtil msgUtil = new ThriftMessageUtil();
byte[] serialized = new byte[length];
in.readFully(serialized);
impl = new TAuthenticationTokenIdentifier();
msgUtil.deserialize(serialized, impl);
}
}
use of org.apache.accumulo.core.util.ThriftMessageUtil in project accumulo by apache.
the class AuthenticationTokenIdentifier method write.
@Override
public void write(DataOutput out) throws IOException {
if (null != impl) {
ThriftMessageUtil msgUtil = new ThriftMessageUtil();
ByteBuffer serialized = msgUtil.serialize(impl);
out.writeInt(serialized.limit());
ByteBufferUtil.write(out, serialized);
} else {
out.writeInt(0);
}
}
use of org.apache.accumulo.core.util.ThriftMessageUtil in project accumulo by apache.
the class AuthenticationTokenIdentifier method write.
@Override
public void write(DataOutput out) throws IOException {
ThriftMessageUtil msgUtil = new ThriftMessageUtil();
ByteBuffer serialized = msgUtil.serialize(impl);
out.writeInt(serialized.limit());
ByteBufferUtil.write(out, serialized);
}
use of org.apache.accumulo.core.util.ThriftMessageUtil in project accumulo by apache.
the class AuthenticationKey method readFields.
@Override
public void readFields(DataInput in) throws IOException {
int length = WritableUtils.readVInt(in);
if (length == 0) {
return;
}
ThriftMessageUtil util = new ThriftMessageUtil();
byte[] bytes = new byte[length];
in.readFully(bytes);
authKey = util.deserialize(bytes, new TAuthenticationKey());
secret = AuthenticationTokenSecretManager.createSecretKey(authKey.getSecret());
}
Aggregations