protected <TokenType extends OAuth20Token> TokenType resolveToken(final Ticket token, final Class<TokenType> clazz) {
        return token == null
            ? null
            : (token.isStateless() ? configurationContext.getObject().getTicketRegistry().getTicket(token.getId(), clazz) : (TokenType) token);
    }
This is {@link OAuth20DefaultAccessTokenResponseGenerator}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/web/response/accesstoken/response/OAuth20DefaultAccessTokenResponseGenerator.java