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 request method, it is equivalent to/admins/user/** = perms [user: method]. the method is post, get, and delete. Port: Example/admins/user/** = port [8081]. When the request URL port is not 8081, It is redirected to schemal: // SERVERNAME: 8081? Querystring, where Schmal is the protocol HTTP or HTTPS, servername is the host you access, 8081 is the port of the port in the URL configuration, querystring In the URL you accessed? Parameters.
Perms: Example/admins/user/** = perms [user: Add: *]. You can write multiple perms parameters. If there are multiple parameters, you must add quotation marks, and the parameters are separated by commas, for example,/admins/user/** = perms ["User: Add: *, user: Modify: *"], when there are multiple parameters, each parameter must pass. Ispermitedall () method.
Roles: Example/admins/user/** = roles [admin]. Multiple parameters can be entered. If multiple parameters are entered, quotation marks must be added and the parameters are separated by commas, when there are multiple parameters, such as/admins/user/** = roles ["Admin, guest"], each parameter is passed, which is equivalent to the hasallroles () method.
Anon: Example/admins/** = anon has no parameter, indicating that it can be used anonymously. Authc: for example,/admins/user/** = authc indicates that authentication is required before use. No parameter exists. Authcbasic: for example,/admins/user/** = authcbasic. No parameter indicates 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. If no parameter exists, the user must exist. No check is performed during login. These filters are divided into two groups: authentication filters and authorization filters.
Anon, authcbasic, auchc, and user are the first group,
Perms, roles, SSL, rest, port is the second group