axum-login icon indicating copy to clipboard operation
axum-login copied to clipboard

Allow customizing extractor responses

Open czocher opened this issue 2 years ago • 3 comments

Hello, Currently the library always returns a specified set of responses on errors. We can see it here and here.

In some cases the users may want to modify the returned values e.g. to implement RFC 7807. The library should possibly allow this kind of use-case the same way as the axum Json extractor allows to specify a rejection response.

@maxcountryman any thoughts?

czocher avatar Jan 12 '23 16:01 czocher

Agree. We should support this.

I'd welcome contributions to this end.

maxcountryman avatar Jan 12 '23 16:01 maxcountryman

With v0.7.0 we take a different approach and I think this is no longer a problem.

maxcountryman avatar Nov 07 '23 22:11 maxcountryman

I believe so, but we should probably use this task to create an example how to do it.

czocher avatar Nov 08 '23 11:11 czocher