This interface is used to specify extra payload in case
AuthenticationException
occurs. The inner static classes which form a parent child hierarchy are to be used.
The parent class
AuthenticationErrorInfo.GeneralInfo
has a data map to store general
items. If extra more specific items are needed, this class should be extended like the below
case of JwtClaims. The users can then check with and instanceof check and cast accordingly.
Additionally, since AuthenticationErrorInfo is an interface - the inner static classes can forgo extending
GeneralInfo if needed and implement AuthenticationErrorInfo instead.