21 Ağustos 2020 Cuma

SpringSecurity AccessDecisionVoter Arayüzü

Örnek
Şöyle yaparız
public class ScopeVoter implements AccessDecisionVoter<MethodInvocation> {

@Override
public int vote(Authentication authentication, MethodInvocation object,alo
  Collection<ConfigAttribute> attributes) {
  //if the logic is not met, throw it directly
  throw new AccessDeniedException("your customize message is here");
}

Hiç yorum yok:

Yorum Gönder