Add remaining methods from ExpressionUrlAuthorizationConfigurer to MessageMatcherDelegatingAuthorizationManager

- Added fullyAuthenticated
- Added rememberMe
- Added anonymous

Closes gh-11509
This commit is contained in:
Evgeniy Cheban
2022-08-06 20:11:19 +02:00
committed by Josh Cummings
parent 00302c80ad
commit 5ecd513a57
2 changed files with 85 additions and 1 deletions

View File

@@ -332,6 +332,34 @@ public final class MessageMatcherDelegatingAuthorizationManager implements Autho
return access(AuthenticatedAuthorizationManager.authenticated());
}
/**
* Specify that Messages are allowed by users who have authenticated and were
* not "remembered".
* @return the {@link Builder} for further customization
* @since 5.8
*/
public Builder fullyAuthenticated() {
return access(AuthenticatedAuthorizationManager.fullyAuthenticated());
}
/**
* Specify that Messages are allowed by users that have been remembered.
* @return the {@link Builder} for further customization
* @since 5.8
*/
public Builder rememberMe() {
return access(AuthenticatedAuthorizationManager.rememberMe());
}
/**
* Specify that Messages are allowed by anonymous users.
* @return the {@link Builder} for further customization
* @since 5.8
*/
public Builder anonymous() {
return access(AuthenticatedAuthorizationManager.anonymous());
}
/**
* Allows specifying that Messages are secured by an arbitrary expression
* @param authorizationManager the {@link AuthorizationManager} to secure the