shiro built-in filter research

anon
org.apache.shiro.web.filter.authc.AnonymousFilter
authc
org.apache.shiro.web.filter.authc.FormAuthenticationFilter
authcBasic
org.apache.shiro.web.filter.authc.BasicHttpAuthenticationFilter
perms
org.apache.shiro.web.filter.authz.PermissionsAuthorizationFilter
port
org.apache.shiro.web.filter.authz.PortFilter
rest
org.apache.shiro.web.filter.authz.HttpMethodPermissionFilter
roles
org.apache.shiro.web.filter.authz.RolesAuthorizationFilter
ssl org.apache.shiro.web.filter.authz.SslFilter
user org.apache.shiro.web.filter.authc.UserFilter

rest: example /admins/user/**=rest[user], according to the method of the request, equivalent to /admins/user/**=perms[user:method], where the method is post, get, delete, etc.
port: example /admins/user/**=port[8081], when the port of the requested url is not 8081, it will jump to schema://serverName:8081?queryString, where schmal is the protocol http or https, etc., serverName is you The accessed host, 8081 is the port of the port in the url configuration, queryString
Is it in the url you visited? the following parameters.
perms: For example /admins/user/**=perms[user:add:*], multiple perms parameters can be written, multiple quotes must be added, and the parameters are separated by commas, such as /admins/user/* *=perms["user:add:*,user:modify:*"], when there are multiple parameters, each parameter must be passed before passing, think of it as
isPermitedAll ()。
roles: example /admins/user/**=roles[admin], multiple parameters can be written, quotes must be added when multiple, and the parameters are separated by commas, when there are multiple parameters, such as /admins/user /**=roles["admin,guest"], each parameter is passed only when passed, which is equivalent to the hasAllRoles() method.
anon: For example, /admins/**=anon has no parameters, which means it can be used anonymously.
authc: For example, /admins/user/**=authc means authentication is required to use, no parameters
authcBasic: For example /admins/user/**=authcBasic no parameter means httpBasic authentication
ssl: example /admins/user/**=ssl has no parameters, indicating a secure url request, the protocol is https
user: For example, /admins/user/**=user has no parameter to indicate that a user must exist, and no check is performed when logging in
 
These filters are divided into two groups, one is the authentication filter and the other is the authorization filter. where anon, authcBasic, auchc, user is the first group,
perms, roles, ssl, rest, port are the second group
 
 
 
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325498014&siteId=291194637