P.S. Here is the BasicAuthenticationFilter's similar logic:
http://shiro.apache.org/static/1.1.0/xref/org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.html#186
P.S. Here is the BasicAuthenticationFilter's similar logic:
http://shiro.apache.org/static/1.1.0/xref/org/apache/shiro/web/filter/authc/BasicHttpAuthenticationFilter.html#186