Skip to content

Improve the BasicAuthenticationFilter to allow callbacks for both successful and failed authentication events. #16281

@pongdangx2

Description

@pongdangx2

Expected Behavior

Can customize and set callback method in BasicAuthenticationFilter. (Such as logging, saving audit log .. etc)

Current Behavior

Now, there are two empty protected method called onSuccessFulAuthentication, onUnsuccessfulAuthentication.
I think it would be nice if I can customize the actions of these methods.

Context

I use Basic authentication for authentication in server-to-server communication within an private internal network.
And I wish I could save the information of client for audit log. (Which client call which api how many times during specific period)
For this reason, I looked into this BasicAuthenticaionFilter and I found those two empty methods.

So I wanna improve BasicAuthenticationFilter If youguys are ok with it.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions