package modules.jwt.decoder

import scala.util.Try

class JwtDecoderImpl extends JwtDecoder {
  override def decode(token: String): Try[String] = ???
}
package modules.jwt.decoder

import javax.inject.{Inject, Named}
import pdi.jwt.Jwt
import pdi.jwt.algorithms.JwtHmacAlgorithm

import scala.util.Try

class JwtDecoderImpl @Inject()(@Named("jwt.secretKey") secretKey: String,
                               algorithm: JwtHmacAlgorithm) extends JwtDecoder {
  override def decode(token: String): Try[String] = {
    Jwt.decodeRaw(token, secretKey, Seq(algorithm))
  }
}
Add an implementation to JwtDecoder
Add an implementation to JwtDecoder
