use of org.apache.kerby.kerberos.kerb.type.base.AuthToken in project testcases by coheigea.
the class KerbyHttpAuthSupplier method decorateSubject.
@Override
protected void decorateSubject(Subject subject) {
KrbRuntime.setTokenProvider(new JwtTokenProvider());
try {
JWT jwt = JWTParser.parse(jwtToken);
AuthToken authToken = new JwtAuthToken(jwt.getJWTClaimsSet());
KrbToken krbToken = new KrbToken(authToken, TokenFormat.JWT);
krbToken.setTokenValue(jwtToken.getBytes());
subject.getPrivateCredentials().add(krbToken);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Aggregations