Interface ComboWarlockAuthzService.Combo

  • All Implemented Interfaces:
    org.springframework.core.Ordered

    
    public interface ComboWarlockAuthzService.Combo
     implements Ordered
                        

    Apply combo auth to user. e.g. change the details directly or add roles/perm before th unified processing. Unified processing includes (1) recursive loading, flattening (2) removing exclusions (starting with `-`).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract boolean preAuth(@NotNull() DefaultWingsUserDetails details, @NotNull() HashSet<Object> role, @NotNull() HashSet<Object> perm) Prepare data for unified processing of roles and perm, e.g.
      void postAuth(@NotNull() DefaultWingsUserDetails details, @NotNull() HashMap<String, GrantedAuthority> auths) Filter, add or remove auths after Unified processing
      • Methods inherited from class org.springframework.core.Ordered

        getOrder
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • preAuth

         abstract boolean preAuth(@NotNull() DefaultWingsUserDetails details, @NotNull() HashSet<Object> role, @NotNull() HashSet<Object> perm)

        Prepare data for unified processing of roles and perm, e.g. modify role and perm. Return `true` for solo processing, stopping any subsequent Combo (sort by Order), such as directly specify the permissions, no subsequent additions,

        Parameters:
        details - details with/without GrantedAuthority
        role - id(Long), name(String) or Auth(GrantedAuthority)
        perm - id(Long), name(String) or Auth(GrantedAuthority)
        Returns:

        Whether to stop any subsequent Combo, default false.

      • postAuth

         void postAuth(@NotNull() DefaultWingsUserDetails details, @NotNull() HashMap<String, GrantedAuthority> auths)

        Filter, add or remove auths after Unified processing

        Parameters:
        details - details with/without GrantedAuthority
        auths - Flattened and exclusions removed permissions