/* * Copyright (c) 2023. yo-saito. All Rights Reserved. */ package net.piedpiper.bremer.model.api import net.piedpiper.bremer.entity.UserEntity import org.springframework.security.core.GrantedAuthority import org.springframework.security.core.userdetails.UserDetails class BremerUser( private val user: UserEntity ) : UserDetails { override fun getAuthorities(): MutableCollection<out GrantedAuthority> = mutableListOf() override fun getUsername(): String = user.accountId override fun getPassword(): String = user.secret override fun isAccountNonExpired(): Boolean = true override fun isAccountNonLocked(): Boolean = true override fun isCredentialsNonExpired(): Boolean = true override fun isEnabled(): Boolean = true }