在 debug 的过程中,发现了 Shiro 的执行顺序:

    isAccessAllowed ==> onAccessDenied ==> executeLogin ==> createToken ==> doAuthenticate
    ==> doGetAuthenticationInfo

    前四步都在 OAuth2Filter类 里面,doGetAuthenticationInfo 在 OAuth2Realm类 里面。

    doAuthenticate ==> 到 doGetAuthenticationInfo 中间经过一段很长的过程。