trait JwtClaims extends AnyRef
Representation of JWT claims that have been validated and extracted from the bearer token of a request.
- Source
- JwtClaims.scala
- Alphabetic
- By Inheritance
- JwtClaims
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def allClaimNames: Iterable[String]
Returns the names of all the claims in this request.
Returns the names of all the claims in this request.
- returns
The names of all the claims in this request.
- abstract def asMap: Map[String, String]
Returns all the claims as a map of strings to strings.
Returns all the claims as a map of strings to strings.
If the claim is a String claim, the value will be the raw String. For all other types, it will be the value of the claim encoded to JSON.
- returns
All the claims represented as a map of string claim names to string values.
- abstract def getString(name: String): Option[String]
Get the string claim with the given name.
Get the string claim with the given name.
Note that if the claim with the given name is not a string claim, this will return the JSON encoding of it.
- name
The name of the claim.
- returns
The string claim, if present.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (JwtClaims, B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def audience: Option[String]
Get the audience, that is, the
audclaim, as described in RFC 7519 section 4.1.3.Get the audience, that is, the
audclaim, as described in RFC 7519 section 4.1.3.- returns
the audience, if present.
- See also
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def ensuring(cond: (JwtClaims) => Boolean, msg: => Any): JwtClaims
- def ensuring(cond: (JwtClaims) => Boolean): JwtClaims
- def ensuring(cond: Boolean, msg: => Any): JwtClaims
- def ensuring(cond: Boolean): JwtClaims
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def expirationTime: Option[Instant]
Get the expiration time, that is, the
expclaim, as described in RFC 7519 section 4.1.4.Get the expiration time, that is, the
expclaim, as described in RFC 7519 section 4.1.4.- returns
the expiration time, if present. Returns scala.None if the value is not a numeric date.
- See also
- def getBoolean(name: String): Option[Boolean]
Get the boolean claim with the given name.
Get the boolean claim with the given name.
- name
The name of the claim.
- returns
The boolean claim, if present. Returns scala.None if the claim is not a boolean or can't be parsed as a boolean.
- def getBooleanList(name: String): Option[Seq[Boolean]]
Get the boolean list claim with the given name.
Get the boolean list claim with the given name.
- name
The name of the claim.
- returns
The boolean list claim, if present. Returns scala.None if the claim is not a JSON array of booleans or cannot be parsed as a JSON array of booleans.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getDouble(name: String): Option[Double]
Get the double claim with the given name.
Get the double claim with the given name.
- name
The name of the claim.
- returns
The double claim, if present. Returns scala.None if the claim is not a double or can't be parsed as an double.
- def getDoubleList(name: String): Option[Seq[Double]]
Get the double list claim with the given name.
Get the double list claim with the given name.
- name
The name of the claim.
- returns
The double list claim, if present. Returns scala.None if the claim is not a JSON array of doubles or cannot be parsed as a JSON array of doubles.
- def getInt(name: String): Option[Int]
Get the int claim with the given name.
Get the int claim with the given name.
- name
The name of the claim.
- returns
The integer claim, if present. Returns scala.None if the claim is not an int or can't be parsed as an int.
- def getIntegerList(name: String): Option[Seq[Int]]
Get the integer list claim with the given name.
Get the integer list claim with the given name.
- name
The name of the claim.
- returns
The integer list claim, if present. Returns scala.None if the claim is not a JSON array of integers or cannot be parsed as a JSON array of integers.
- def getLong(name: String): Option[Long]
Get the long claim with the given name.
Get the long claim with the given name.
- name
The name of the claim.
- returns
The long claim, if present. Returns scala.None if the claim is not a long or can't be parsed as an long.
- def getLongList(name: String): Option[Seq[Long]]
Get the long list claim with the given name.
Get the long list claim with the given name.
- name
The name of the claim.
- returns
The long list claim, if present. Returns scala.None if the claim is not a JSON array of longs or cannot be parsed as a JSON array of longs.
- def getNumericDate(name: String): Option[Instant]
Get the numeric data claim with the given name.
Get the numeric data claim with the given name.
Numeric dates are expressed as a number of seconds since epoch, as described in RFC 7519 section 2.
- name
The name of the claim.
- returns
The numeric date claim, if present. Returns scala.None if the claim is not a numeric date or can't be parsed as a numeric date.
- See also
- def getNumericDateList(name: String): Option[Seq[Instant]]
Get the numeric date list claim with the given name.
Get the numeric date list claim with the given name.
- name
The name of the claim.
- returns
The numeric date list claim, if present. Returns scala.None if the claim is not a JSON array of numeric dates or cannot be parsed as a JSON array of numeric dates.
- def getObject(name: String): Option[JsObject]
Get the object claim with the given name.
Get the object claim with the given name.
This returns the claim as a Spray JsObject.
- name
The name of the claim.
- returns
The object claim, if present. Returns scala.None if the claim is not an object or can't be parsed as an object.
- def getObjectList(name: String): Option[Seq[JsObject]]
Get the object list claim with the given name.
Get the object list claim with the given name.
- name
The name of the claim.
- returns
The object list claim, if present. Returns scala.None if the claim is not a JSON array of objects or cannot be parsed as a JSON array of objects.
- def getStringList(name: String): Option[Seq[String]]
Get the string list claim with the given name.
Get the string list claim with the given name.
- name
The name of the claim.
- returns
The string list claim, if present. Returns scala.None if the claim is not a JSON array of strings or cannot be parsed as a JSON array of strings.
- def hasClaims: Boolean
Does this request have any claims that have been validated?
Does this request have any claims that have been validated?
- returns
true if there are claims.
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def issuedAt: Option[Instant]
Get the issued at, that is, the
iatclaim, as described in RFC 7519 section 4.1.6.Get the issued at, that is, the
iatclaim, as described in RFC 7519 section 4.1.6.- returns
the issued at, if present. Returns scala.None if the value is not a numeric date.
- See also
- def issuer: Option[String]
Get the issuer, that is, the
issclaim, as described in RFC 7519 section 4.1.1.Get the issuer, that is, the
issclaim, as described in RFC 7519 section 4.1.1.- returns
the issuer, if present.
- See also
- def jwtId: Option[String]
Get the JWT ID, that is, the
jticlaim, as described in RFC 7519 section 4.1.7.Get the JWT ID, that is, the
jticlaim, as described in RFC 7519 section 4.1.7.- returns
the JWT ID, if present.
- See also
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def notBefore: Option[Instant]
Get the not before, that is, the
nbfclaim, as described in RFC 7519 section 4.1.5.Get the not before, that is, the
nbfclaim, as described in RFC 7519 section 4.1.5.- returns
the not before, if present. Returns scala.None if the value is not a numeric date.
- See also
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def subject: Option[String]
Get the subject, that is, the
subclaim, as described in RFC 7519 section 4.1.2.Get the subject, that is, the
subclaim, as described in RFC 7519 section 4.1.2.- returns
the subject, if present.
- See also
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from JwtClaims toStringFormat[JwtClaims] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)instead ofvalue.formatted(formatString), or use thef""string interpolator. In Java 15 and later,formattedresolves to the new method in String which has reversed parameters.
- def →[B](y: B): (JwtClaims, B)
- Implicit
- This member is added by an implicit conversion from JwtClaims toArrowAssoc[JwtClaims] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.