BadCredentialsException class

A login was refused because the username or the password is wrong.

DaoAuthenticationProvider throws it for a wrong password and also for an unknown username, so a client cannot learn which usernames exist. A login request whose credentials are not a String fails with it too.

Spring (Java): BadCredentialsException.

Inheritance

Constructors

BadCredentialsException([String message = 'Bad credentials', Object? cause])
A refused login; message defaults to 'Bad credentials'.

Properties

authenticationRequest ↔ Authentication?
The login request that failed, set by ProviderManager; null when unknown.
getter/setter pairinherited
cause → Object?
The lower-level error that led to this one, or null.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
message → String
What went wrong, for logs; never sent to the client.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited