cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Authenticator which will return 401 unauthorized on bad credentials and not execute system authenticators

jacekgra
1-Newbie

Authenticator which will return 401 unauthorized on bad credentials and not execute system authenticators

Is it possible to write custom authenticator that will:

1) Has top priority (executed first) - YES

2) Be executed only when certian header will be present in the request - YES

3) Return 401 Unauthorized if credentials will be wrong AND respond to the user immedietally without executing system authenciators (HTTP BASIC etc) - ???

1 ACCEPTED SOLUTION

Accepted Solutions
keriw
1-Newbie
(To:jacekgra)

you can have it do custom checks as the first part of your authenticator and if your custom checks fail you should be able to then use

httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, "your message goes here");

View solution in original post

1 REPLY 1
keriw
1-Newbie
(To:jacekgra)

you can have it do custom checks as the first part of your authenticator and if your custom checks fail you should be able to then use

httpResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED, "your message goes here");

Top Tags