Add an interceptor interface for WebSocket authentication

This commit is contained in:
Jon Chambers
2025-02-28 09:33:24 -05:00
committed by Jon Chambers
parent 59d984e25d
commit 552079d3c2
5 changed files with 59 additions and 1 deletions

View File

@@ -49,7 +49,7 @@ public class WebSocketAccountAuthenticator implements WebSocketAuthenticator<Aut
return CREDENTIALS_NOT_PRESENTED;
}
return basicCredentialsFromAuthHeader(authHeader)
.flatMap(credentials -> accountAuthenticator.authenticate(credentials))
.flatMap(accountAuthenticator::authenticate)
.map(authenticatedAccount -> ReusableAuth.authenticated(authenticatedAccount, this.principalSupplier))
.orElse(INVALID_CREDENTIALS_PRESENTED);
}