@Test public void shouldGetKeyId() throws Exception { Map<String, Object> keyIdHeader = Collections.singletonMap("kid", (Object) "key-id"); String token = JWT.create() .withHeader(keyIdHeader) .sign(hmacAlgorithm); AuthenticationJsonWebToken auth = new AuthenticationJsonWebToken(token, verifier); assertThat(auth, is(notNullValue())); assertThat(auth.getKeyId(), is("key-id")); }
@Override public String getKeyId() { return decoded.getKeyId(); }
AuthenticationJsonWebToken implements Authentication, JwtAuthentication { @Override public String getKeyId() { return decoded.getKeyId(); } }
AuthenticationJsonWebToken implements Authentication, JwtAuthentication { @Override public String getKeyId() { return decoded.getKeyId(); } AuthenticationJsonWebToken(String token, JWTVerifier verifier); }
AuthenticationJsonWebToken implements Authentication, JwtAuthentication { @Override public String getKeyId() { return decoded.getKeyId(); } AuthenticationJsonWebToken(String token, JWTVerifier verifier); @Override String getToken(); @Override String getKeyId(); @Override Authentication verify(JWTVerifier verifier); @Override Collection<? extends GrantedAuthority> getAuthorities(); @Override Object getCredentials(); @Override Object getDetails(); @Override Object getPrincipal(); @Override boolean isAuthenticated(); @Override void setAuthenticated(boolean isAuthenticated); @Override String getName(); }
AuthenticationJsonWebToken implements Authentication, JwtAuthentication { @Override public String getKeyId() { return decoded.getKeyId(); } AuthenticationJsonWebToken(String token, JWTVerifier verifier); @Override String getToken(); @Override String getKeyId(); @Override Authentication verify(JWTVerifier verifier); @Override Collection<? extends GrantedAuthority> getAuthorities(); @Override Object getCredentials(); @Override Object getDetails(); @Override Object getPrincipal(); @Override boolean isAuthenticated(); @Override void setAuthenticated(boolean isAuthenticated); @Override String getName();  }