package com.example.loginapi import org.springframework.security.oauth2.provider.OAuth2Authentication import org.springframework.security.oauth2.provider.token.DefaultAccessTokenConverter import org.springframework.stereotype.Component /** * @author sombochea * @email sombochea@cubetiqs.com * @date 16/10/19 * @since 1.0 */ @Component class CubeJwtAccessTokenConverter : DefaultAccessTokenConverter() { override fun extractAuthentication(map: Map?): OAuth2Authentication { val authentication = super.extractAuthentication(map) authentication.details = map return authentication } }