File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
oauth2-server-core/src/main/java/nl/myndocs/oauth2/request/auth Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -4,17 +4,10 @@ import nl.myndocs.oauth2.request.CallContext
44import nl.myndocs.oauth2.router.RedirectRouter
55
66object CallContextBasicAuthenticator {
7- fun handleAuthentication (callContext : CallContext , callRouter : RedirectRouter ) {
8- val basicAuthenticator = BasicAuthenticator (callContext)
9- if (basicAuthenticator.extractCredentials() == null ) {
10- basicAuthenticator.openAuthenticationDialog()
11- } else {
12- callRouter.route(callContext, basicAuthenticator.extractCredentials())
13- .also {
14- if (! it.successfulLogin) {
15- basicAuthenticator.openAuthenticationDialog()
16- }
17- }
7+ fun handleAuthentication (context : CallContext , router : RedirectRouter ) = with (BasicAuthenticator (context)) {
8+ router.route(context, this .extractCredentials()).also { response ->
9+ if (! response.successfulLogin)
10+ openAuthenticationDialog()
1811 }
1912 }
2013}
You can’t perform that action at this time.
0 commit comments