/** * Get token value. * @return The token value */ public byte[] getTokenValue() { return getFieldAsOctets(KrbTokenField.TOKEN_VALUE); }
/** * Set token value. * @param tokenValue The token value */ public void setTokenValue(byte[] tokenValue) { setFieldAsOctets(KrbTokenField.TOKEN_VALUE, tokenValue); }
/** * Set token format. * @param tokenFormat The token format */ public void setTokenFormat(TokenFormat tokenFormat) { setFieldAsInt(KrbTokenField.TOKEN_FORMAT, tokenFormat.getValue()); }
/** * Get token format. * @return The token format */ public TokenFormat getTokenFormat() { Integer value = getFieldAsInteger(KrbTokenField.TOKEN_FORMAT); return TokenFormat.fromValue(value); }
/** * {@inheritDoc} */ /* @Override public void decode(ByteBuffer content) throws IOException { super.decode(content); this.innerToken = getTokenDecoder().decodeFromBytes(getTokenValue()); setTokenType(); }*/ @Override public void decode(Asn1ParseResult parseResult) throws IOException { super.decode(parseResult); if (getTokenValue() != null) { this.innerToken = getTokenDecoder(getTokenFormat()).decodeFromBytes(getTokenValue()); setTokenType(); } }
authToken = tokenDecoder.decodeFromBytes(token.getTokenValue()); if (!tokenDecoder.isSigned() && !kdcRequest.isHttps()) { throw new KrbException("Token should be signed.");
/** * Set token format. * @param tokenFormat The token format */ public void setTokenFormat(TokenFormat tokenFormat) { setFieldAsInt(KrbTokenField.TOKEN_FORMAT, tokenFormat.getValue()); }
/** * Get token format. * @return The token format */ public TokenFormat getTokenFormat() { Integer value = getFieldAsInteger(KrbTokenField.TOKEN_FORMAT); return TokenFormat.fromValue(value); }
/** * {@inheritDoc} */ /* @Override public void decode(ByteBuffer content) throws IOException { super.decode(content); this.innerToken = getTokenDecoder().decodeFromBytes(getTokenValue()); setTokenType(); }*/ @Override public void decode(Asn1ParseResult parseResult) throws IOException { super.decode(parseResult); if (getTokenValue() != null) { this.innerToken = getTokenDecoder(getTokenFormat()).decodeFromBytes(getTokenValue()); setTokenType(); } }
authToken = tokenDecoder.decodeFromBytes(token.getTokenValue()); if (!tokenDecoder.isSigned() && !kdcRequest.isHttps()) { throw new KrbException("Token should be signed.");
/** * Get token value. * @return The token value */ public byte[] getTokenValue() { return getFieldAsOctets(KrbTokenField.TOKEN_VALUE); }
/** * Set token value. * @param tokenValue The token value */ public void setTokenValue(byte[] tokenValue) { setFieldAsOctets(KrbTokenField.TOKEN_VALUE, tokenValue); }