Class LockoutException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.security.core.AuthenticationException
org.springframework.security.authentication.AccountStatusException
org.springframework.security.authentication.LockedException
io.leandev.appfuse.security.lockout.api.LockoutException
- All Implemented Interfaces:
Serializable
public class LockoutException
extends org.springframework.security.authentication.LockedException
帳號鎖定異常
當使用者因連續登入失敗而被鎖定時拋出此異常。 繼承自 Spring Security 的 LockedException,可被標準異常處理機制捕獲。
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLockoutException(String message, String principal, Duration remainingTime, int failureCount) 建構鎖定異常 -
Method Summary
Modifier and TypeMethodDescriptionint取得失敗次數取得使用者帳號取得剩餘鎖定時間Methods inherited from class org.springframework.security.core.AuthenticationException
getAuthenticationRequest, setAuthenticationRequestMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
LockoutException
-
-
Method Details
-
getPrincipal
取得使用者帳號 -
getRemainingTime
取得剩餘鎖定時間 -
getFailureCount
public int getFailureCount()取得失敗次數
-