protected static boolean isRefreshToken(final OAuth20Token token) {
        return token instanceof OAuth20RefreshToken;
    }
Is the OAuth token a Refresh Token?

@param token the token
@return whether the token type is a RefreshToken
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/endpoints/BaseOAuth20Controller.java