Some improvements#151
Conversation
37a4631 to
7870615
Compare
7870615 to
9c29985
Compare
| const contentTypeJSON = "application/json" | ||
| const contentTypePlain = "text/plain" | ||
|
|
||
| type userClaimsFunc func(userInfo model.UserInfo) (jwt.Claims, error) |
There was a problem hiding this comment.
This type should not be exported. It makes no sense to export this from my point of view; it is an implementation detail of loginsrv and not a public API which should be used from outside. If you want to provide custom user claims use the "user endpoint"-feature
There was a problem hiding this comment.
I am using loginsrv embedded in my application, and my custom provider is just another piece of code in that application. It doesn't make sense to do provision over HTTP in this case(opening localhost server, and then connecting to itself). Maybe if we export UserClaimsFunc "user endpoint" feature becomes one of the user claims providers available.
I do find mandatory provision over HTTP as unnecessary.
| Equal(t, input, output) | ||
| } | ||
|
|
||
| func callWithHandler(h *Handler, req *http.Request) *httptest.ResponseRecorder { |
There was a problem hiding this comment.
Could you please move this to the end of the file.
|
Hello @Dragomir-Ivanov , Thanks, Gregor |
No description provided.