JwtAlgorithm

object JwtAlgorithm
Companion
class
class Object
trait Matchable
class Any

Type members

Classlikes

case object ES256 extends JwtECDSAAlgorithm
case object ES384 extends JwtECDSAAlgorithm
case object ES512 extends JwtECDSAAlgorithm
case object Ed25519 extends JwtEdDSAAlgorithm
case object HMD5 extends JwtHmacAlgorithm
case object HS224 extends JwtHmacAlgorithm
case object HS256 extends JwtHmacAlgorithm
case object HS384 extends JwtHmacAlgorithm
case object HS512 extends JwtHmacAlgorithm
case object RS256 extends JwtRSAAlgorithm
case object RS384 extends JwtRSAAlgorithm
case object RS512 extends JwtRSAAlgorithm

Value members

Concrete methods

def allRSA(): Seq[JwtRSAAlgorithm]
def fromString(algo: String): JwtAlgorithm

Deserialize an algorithm from its string equivalent. Only real algorithms supported, if you need to support "none", use "optionFromString".

Deserialize an algorithm from its string equivalent. Only real algorithms supported, if you need to support "none", use "optionFromString".

Value Params
algo

the name of the algorithm (e.g. HS256 or HmacSHA256)

Returns

the actual instance of the algorithm

Throws
JwtNonSupportedAlgorithm

in case the string doesn't match any known algorithm

def optionFromString(algo: String): Option[JwtAlgorithm]

Deserialize an algorithm from its string equivalent. If it's the special "none" algorithm, return None, else, return Some with the corresponding algorithm inside.

Deserialize an algorithm from its string equivalent. If it's the special "none" algorithm, return None, else, return Some with the corresponding algorithm inside.

Value Params
algo

the name of the algorithm (e.g. none, HS256 or HmacSHA256)

Returns

the actual instance of the algorithm