如何在aouth2配置方法中获取当前用户详细信息

时间:2018-11-21 06:52:11

标签: spring-boot oauth-2.0

在弹簧靴中使用Aouth2。

$gateway_site_id = $_POST['gateway_site_id'] ?: 'N/A' ;
// ...
$gateway_username = $_POST['gateway_username'] ?: 'N/A';

// all `if`s can be removed

我尝试过: 使用

protected void configure(AuthenticationManagerBuilder auth) throws Exception {

    //I want to get current user object inside this method in order to get the user name from it.    

 }

但是对象userByContest为空

0 个答案:

没有答案