Class RecentSignInMethodInterceptor

java.lang.Object
org.jwcarman.who.spring.security.RecentSignInMethodInterceptor

public final class RecentSignInMethodInterceptor extends Object
Enforces @RequiresRecentSignIn on methods and types, right after Spring Security's @PreAuthorize checks, so a missing permission answers before a stale sign-in does.
  • Method Details

    • create

      public static org.springframework.security.authorization.method.AuthorizationManagerBeforeMethodInterceptor create(Supplier<RecentSignInAuthorizationManager> recentSignIn)
      Creates the interceptor.
      Parameters:
      recentSignIn - the manager with the default window; asked for on first use
      Returns:
      the interceptor, to register as an infrastructure bean