|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.config.annotation.web.configurers.UrlAuthorizationConfigurer.AuthorizedUrl
public final class UrlAuthorizationConfigurer.AuthorizedUrl
Maps the specified RequestMatcher
instances to ConfigAttribute
instances.
Method Summary | |
---|---|
UrlAuthorizationConfigurer<H,C> |
access(String... attributes)
Specifies that the user must have the specified ConfigAttribute 's |
UrlAuthorizationConfigurer<H,C> |
anonymous()
Specifies that an anonymous user is allowed access |
UrlAuthorizationConfigurer<H,C> |
hasAnyAuthority(String... authorities)
Specifies that a user requires one of many authorities |
UrlAuthorizationConfigurer<H,C> |
hasAnyRole(String... roles)
Specifies that a user requires one of many roles. |
UrlAuthorizationConfigurer<H,C> |
hasAuthority(String authority)
Specifies a user requires an authority. |
UrlAuthorizationConfigurer<H,C> |
hasRole(String role)
Specifies a user requires a role. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public UrlAuthorizationConfigurer<H,C> hasRole(String role)
role
- the role that should be required which is prepended with ROLE_
automatically (i.e. USER, ADMIN, etc). It should not start
with ROLE_
the UrlAuthorizationConfigurer
for further customizationpublic UrlAuthorizationConfigurer<H,C> hasAnyRole(String... roles)
roles
- the roles that the user should have at least one of (i.e.
ADMIN, USER, etc). Each role should not start with ROLE_ since
it is automatically prepended already.
UrlAuthorizationConfigurer
for further customizationpublic UrlAuthorizationConfigurer<H,C> hasAuthority(String authority)
authority
- the authority that should be required
UrlAuthorizationConfigurer
for further customizationpublic UrlAuthorizationConfigurer<H,C> hasAnyAuthority(String... authorities)
authorities
- the authorities that the user should have at least one of (i.e. ROLE_USER, ROLE_ADMIN, etc).
UrlAuthorizationConfigurer
for further customizationpublic UrlAuthorizationConfigurer<H,C> anonymous()
UrlAuthorizationConfigurer
for further customizationpublic UrlAuthorizationConfigurer<H,C> access(String... attributes)
ConfigAttribute
's
attributes
- the ConfigAttribute
's that restrict access to a URL
UrlAuthorizationConfigurer
for further customization
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |