protected Map < String , Object > getAccessTokenResponseModel ( final HttpServletRequest request , final HttpServletResponse response , final OAuth20AccessTokenResponseResult result ) { val model = new LinkedHashMap < String , Object > ( ) ; val generatedToken = result . getGeneratedToken ( ) ; generatedToken . getAccessToken ( ) . ifPresent ( t -> { model . put ( OAuth20Constants . ACCESS_TOKEN , encodeAccessToken ( t , result ) ) ; model . put ( OAuth20Constants . SCOPE , t . getScopes ( ) . stream ( ) . collect ( joining ( " " ) ) ) ; } ) ; generatedToken . getRefreshToken ( ) . ifPresent ( t -> model . put ( OAuth20Constants . REFRESH_TOKEN , t . getId ( ) ) ) ; model . put ( OAuth20Constants . TOKEN_TYPE , OAuth20Constants . TOKEN_TYPE_BEARER ) ; model . put ( OAuth20Constants . EXPIRES_IN , result . getAccessTokenTimeout ( ) ) ; return model ; }
Generate internal .