Skip to content

Commit

Permalink
Correct type of extension definition
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnNiang committed Jul 24, 2023
1 parent 4502e32 commit eb28a02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -23,7 +23,8 @@ public UsernamePasswordDelegatingAuthenticationManager(ExtensionGetter extension

@Override
public Mono<Authentication> authenticate(Authentication authentication) {
return extensionGetter.getEnabledExtension(UsernamePasswordAuthenticationManager.class)
return extensionGetter.getEnabledExtensionByDefinition(UsernamePasswordAuthenticationManager.class)
.next()
.flatMap(authenticationManager -> authenticationManager.authenticate(authentication)
.doOnError(t -> log.error(
"failed to authenticate with {}, fallback to default username password "
Expand Down
Expand Up @@ -50,5 +50,5 @@ metadata:
spec:
className: run.halo.app.security.authentication.login.UsernamePasswordAuthenticationManager
displayName: Username password authentication manager
type: SINGLE_INSTANCE
type: SINGLETON
description: "Provides a way to extend the username password authentication."

0 comments on commit eb28a02

Please sign in to comment.