Spring Security OAuth2 with custom TokenGranter in version 2.0.+

前端 未结 4 870
无人及你
无人及你 2021-01-17 17:50

In previous versions of OAuth2 it was possible to add a custom token granter by adding it to the xml configuration in the element.<

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-17 18:25

    You need to add the default ones too, e.g. using a CompositeTokenGranter:

            List tokenGranters = getTokenGranters(); // implementation up to you
            tokenGranter = new CompositeTokenGranter(tokenGranters);
            endpoints.tokenGranter(tokenGranter);
    

提交回复
热议问题