class OAuth2ProviderSettings extends OpenAMSettingsImpl {

    @VisibleForTesting
    static Map<String, Object> createECJWK(String alias, ECPublicKey key, KeyUse use) throws ServerException {
        BigInteger x = key.getW().getAffineX();
        BigInteger y = key.getW().getAffineY();
        SupportedEllipticCurve curve = SupportedEllipticCurve.forKey(key);
        String kid = Hash.hash(alias + ':' + curve.getStandardName() + ':' + x.toString() + ':' + y.toString());
        return json(object(field("kty", "EC"), field(OAuth2Constants.JWTTokenParams.KEY_ID, kid),
                field("use", use.toString()), field("alg", curve.getJwsAlgorithm().name()),
                field("x", Base64url.encode(x.toByteArray())),
                field("y", Base64url.encode(y.toByteArray())),
                field("crv", curve.getStandardName()))).asMap();
    }

    public  OAuth2ProviderSettings(String realm, ResourceSetStore resourceSetStore,
            CookieExtractor cookieExtractor);

}