Use Collection<ConfigAttribute> in examples

To match `org.springframework.security.access.ConfigAttribute`.
This commit is contained in:
Tim te Beek 2022-07-09 15:21:05 +02:00 committed by Josh Cummings
parent 60652afb32
commit 9f4b0ca8b5
No known key found for this signature in database
GPG Key ID: A306A51F43B8E5A5
1 changed files with 3 additions and 3 deletions

View File

@ -129,7 +129,7 @@ public class AccessDecisionManagerAuthorizationManagerAdapter implements Authori
@Override @Override
public AuthorizationDecision check(Supplier<Authentication> authentication, Object object) { public AuthorizationDecision check(Supplier<Authentication> authentication, Object object) {
try { try {
Collection<ConfigAttributes> attributes = this.securityMetadataSource.getAttributes(object); Collection<ConfigAttribute> attributes = this.securityMetadataSource.getAttributes(object);
this.accessDecisionManager.decide(authentication.get(), object, attributes); this.accessDecisionManager.decide(authentication.get(), object, attributes);
return new AuthorizationDecision(true); return new AuthorizationDecision(true);
} catch (AccessDeniedException ex) { } catch (AccessDeniedException ex) {
@ -139,7 +139,7 @@ public class AccessDecisionManagerAuthorizationManagerAdapter implements Authori
@Override @Override
public void verify(Supplier<Authentication> authentication, Object object) { public void verify(Supplier<Authentication> authentication, Object object) {
Collection<ConfigAttributes> attributes = this.securityMetadataSource.getAttributes(object); Collection<ConfigAttribute> attributes = this.securityMetadataSource.getAttributes(object);
this.accessDecisionManager.decide(authentication.get(), object, attributes); this.accessDecisionManager.decide(authentication.get(), object, attributes);
} }
} }
@ -162,7 +162,7 @@ public class AccessDecisionVoterAuthorizationManagerAdapter implements Authoriza
@Override @Override
public AuthorizationDecision check(Supplier<Authentication> authentication, Object object) { public AuthorizationDecision check(Supplier<Authentication> authentication, Object object) {
Collection<ConfigAttributes> attributes = this.securityMetadataSource.getAttributes(object); Collection<ConfigAttribute> attributes = this.securityMetadataSource.getAttributes(object);
int decision = this.accessDecisionVoter.vote(authentication.get(), object, attributes); int decision = this.accessDecisionVoter.vote(authentication.get(), object, attributes);
switch (decision) { switch (decision) {
case ACCESS_GRANTED: case ACCESS_GRANTED: