Apache Shiro built-in filter

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.