xxing1982 / EDU_SYZT

Offshore Project for SYZT
The Unlicense
2 stars 3 forks source link

Oauth2 with Angular #50

Closed EsanLe closed 9 years ago

EsanLe commented 9 years ago

Adding access token to all requests http://jeremymarc.github.io/2014/08/14/oauth2-with-angular-the-right-way/

Implement the sessionService https://coderwall.com/p/f6brkg/angularjs-access-control-and-authentication

EsanLe commented 9 years ago

Get user entity from any controller or repository

    private SecurityContextUtil securityContextUtil;

    @Autowired
    public void setSecurityContextUtil(SecurityContextUtil securityContextUtil) {
        this.securityContextUtil = securityContextUtil;
    }

then

securityContextUtil.getUser()