public Optional<RegisteredService> getRegisteredService() {
        return Optional.ofNullable(registeredService);
    }
This is {@link OAuth20TokenGeneratedResult}.

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