Example usage for org.springframework.security.jwt.crypto.sign RsaVerifier getClass

List of usage examples for org.springframework.security.jwt.crypto.sign RsaVerifier getClass

Introduction

In this page you can find the example usage for org.springframework.security.jwt.crypto.sign RsaVerifier getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.cloudfoundry.identity.uaa.oauth.token.TokenKeyEndpoint.java

private RSAPublicKey extractRsaPublicKey(RsaVerifier verifier) {
    try {/*w ww  . j  a v a 2 s. c  om*/
        Field f = verifier.getClass().getDeclaredField("key");
        if (f != null) {
            f.setAccessible(true);
            if (f.get(verifier) instanceof RSAPublicKey) {
                return (RSAPublicKey) f.get(verifier);
            }
        }
    } catch (NoSuchFieldException e) {

    } catch (IllegalAccessException e) {

    } catch (ClassCastException x) {

    }
    return null;
}