Authentication
- add AuthenticationController - add AuthenticationService - add getUserByUsername to AccountService - add findByUsername to AccountRepository - add SecurityConfiguration - set up authentication
This commit is contained in:
@@ -21,4 +21,10 @@ class AccountService(
|
||||
): Mono<AccountEntity> = accountRepository.findById(uuid)
|
||||
.doOnNext { log.debug { "Get account ${it.id}" } }
|
||||
.switchIfEmpty(Mono.error(ResponseStatusException(HttpStatus.NOT_FOUND)))
|
||||
|
||||
fun getUserByUsername(
|
||||
username: String,
|
||||
): Mono<AccountEntity> = accountRepository.findByUsername(username)
|
||||
.doOnNext { log.debug { "Get account ${it.id} for username $username" } }
|
||||
.switchIfEmpty(Mono.error(ResponseStatusException(HttpStatus.NOT_FOUND)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user