package dp.kotul.starter.autoconfig

import com.fasterxml.jackson.databind.ObjectMapper
import dp.kotul.jwt.JwtParser
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration

@Configuration
class JwtParserAutoConfiguration {
    @Bean
    @ConditionalOnMissingBean
    fun jwtParser(mapper: ObjectMapper): JwtParser {
        return JwtParser(mapper)
    }
}
