class AuthenticationServiceJwtImpl implements AuthenticationService {

    @Override
    @Nullable
    public RSocketAppPrincipal auth(String type, String credentials) {
        int tokenHashCode = credentials.hashCode();
        RSocketAppPrincipal principal = jwtVerifyCache.getIfPresent(tokenHashCode);
        for (JWTVerifier verifier : verifiers) {
            try {
                principal = new JwtPrincipal(verifier.verify(credentials), credentials);
                jwtVerifyCache.put(tokenHashCode, principal);
                break;
            } catch (JWTVerificationException ignore) {

            }
        }
        return principal;
    }

    public  AuthenticationServiceJwtImpl();

}