final case class JwtFieldOptions(claim: JwtClaimInclude = kalix.jwt.JwtFieldOptions.JwtClaimInclude.UNSPECIFIED, name: String = "", token: Boolean = false, includeParentClaims: Boolean = false, includeBearerTokenClaim: Seq[String] = _root_.scala.Seq.empty, issuer: Seq[String] = _root_.scala.Seq.empty, expiresSeconds: Long = 0L, staticClaim: Seq[JwtStaticClaim] = _root_.scala.Seq.empty, unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty) extends GeneratedMessage with Updatable[JwtFieldOptions] with Product with Serializable
- claim
The inclusion strategy for this field as a claim.
- name
The name of the claim for this field. Only valid for fields with a claim annotation of INCLUDE or NEST. If not set, the name will be the name of this field.
- token
Indicates that this field contains a token, either to be validated, or to be written to. If the field is a single string, then the JWT claim for the containing message will be written to it. If the field is a message or repeated field of messages, then this instructs validation and signing to descend into the message or messages, and validate/sign each one according to the annotations present. If no token annotation is present in the child message, an error will be raised.
- includeParentClaims
If this token annotated field is a child message of a parent, include the claims from the parent in the token.
- includeBearerTokenClaim
A list of bearer token claims to include when signing or validating a token annotated field. The most common use case for this will be pinning tokens contained in this message to the subject in the bearer token, to ensure that the tokens in the message can't be used by other subjects. Bearer token claims will only be included if the method is configured to validate the bearer token, otherwise, validation will fail if the claim can't be read.
- issuer
If set, then when validating a token, only accept the token if it comes from this issuer, and when signing, set the issuer to this value. This can be used in combination with the issuer field of configuration for JWT secrets, if there is at least one secret that has this issuer set, then only those secrets with that issuer set will be used for validating or signing this token, so you can be sure that the token did come from a particular issuer. If an issuer (iss) claim is extracted from another field, this configuration, if set, will override that.
- expiresSeconds
When signing, set the expires claim to be in this many seconds. If unset or zero, will default to 3600 (1 hour). Set to -1 for no expiry. This configuration will override any expiry (exp) claim extracted from other fields. Leave unset, or set to -1, to allow the expiry to be dynamically set.
- staticClaim
If set, the static claims provided and their values will be required when calling the service. When multiple claims are provided, all of them will be required to successfully call the service. When signing, these static claims will also included in the token.
- Annotations
- @SerialVersionUID()
- Source
- JwtFieldOptions.scala
- Alphabetic
- By Inheritance
- JwtFieldOptions
- Updatable
- GeneratedMessage
- Serializable
- Product
- Equals
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new JwtFieldOptions(claim: JwtClaimInclude = kalix.jwt.JwtFieldOptions.JwtClaimInclude.UNSPECIFIED, name: String = "", token: Boolean = false, includeParentClaims: Boolean = false, includeBearerTokenClaim: Seq[String] = _root_.scala.Seq.empty, issuer: Seq[String] = _root_.scala.Seq.empty, expiresSeconds: Long = 0L, staticClaim: Seq[JwtStaticClaim] = _root_.scala.Seq.empty, unknownFields: UnknownFieldSet = _root_.scalapb.UnknownFieldSet.empty)
- claim
The inclusion strategy for this field as a claim.
- name
The name of the claim for this field. Only valid for fields with a claim annotation of INCLUDE or NEST. If not set, the name will be the name of this field.
- token
Indicates that this field contains a token, either to be validated, or to be written to. If the field is a single string, then the JWT claim for the containing message will be written to it. If the field is a message or repeated field of messages, then this instructs validation and signing to descend into the message or messages, and validate/sign each one according to the annotations present. If no token annotation is present in the child message, an error will be raised.
- includeParentClaims
If this token annotated field is a child message of a parent, include the claims from the parent in the token.
- includeBearerTokenClaim
A list of bearer token claims to include when signing or validating a token annotated field. The most common use case for this will be pinning tokens contained in this message to the subject in the bearer token, to ensure that the tokens in the message can't be used by other subjects. Bearer token claims will only be included if the method is configured to validate the bearer token, otherwise, validation will fail if the claim can't be read.
- issuer
If set, then when validating a token, only accept the token if it comes from this issuer, and when signing, set the issuer to this value. This can be used in combination with the issuer field of configuration for JWT secrets, if there is at least one secret that has this issuer set, then only those secrets with that issuer set will be used for validating or signing this token, so you can be sure that the token did come from a particular issuer. If an issuer (iss) claim is extracted from another field, this configuration, if set, will override that.
- expiresSeconds
When signing, set the expires claim to be in this many seconds. If unset or zero, will default to 3600 (1 hour). Set to -1 for no expiry. This configuration will override any expiry (exp) claim extracted from other fields. Leave unset, or set to -1, to allow the expiry to be dynamically set.
- staticClaim
If set, the static claims provided and their values will be required when calling the service. When multiple claims are provided, all of them will be required to successfully call the service. When signing, these static claims will also included in the token.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from JwtFieldOptions toany2stringadd[JwtFieldOptions] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (JwtFieldOptions, B)
- Implicit
- This member is added by an implicit conversion from JwtFieldOptions toArrowAssoc[JwtFieldOptions] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addAllIncludeBearerTokenClaim(__vs: Iterable[String]): JwtFieldOptions
- def addAllIssuer(__vs: Iterable[String]): JwtFieldOptions
- def addAllStaticClaim(__vs: Iterable[JwtStaticClaim]): JwtFieldOptions
- def addIncludeBearerTokenClaim(__vs: String*): JwtFieldOptions
- def addIssuer(__vs: String*): JwtFieldOptions
- def addStaticClaim(__vs: JwtStaticClaim*): JwtFieldOptions
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val claim: JwtClaimInclude
- def clearIncludeBearerTokenClaim: JwtFieldOptions
- def clearIssuer: JwtFieldOptions
- def clearStaticClaim: JwtFieldOptions
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def companion: JwtFieldOptions.type
- Definition Classes
- JwtFieldOptions → GeneratedMessage
- def discardUnknownFields: JwtFieldOptions
- def ensuring(cond: (JwtFieldOptions) => Boolean, msg: => Any): JwtFieldOptions
- Implicit
- This member is added by an implicit conversion from JwtFieldOptions toEnsuring[JwtFieldOptions] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (JwtFieldOptions) => Boolean): JwtFieldOptions
- Implicit
- This member is added by an implicit conversion from JwtFieldOptions toEnsuring[JwtFieldOptions] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): JwtFieldOptions
- Implicit
- This member is added by an implicit conversion from JwtFieldOptions toEnsuring[JwtFieldOptions] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): JwtFieldOptions
- Implicit
- This member is added by an implicit conversion from JwtFieldOptions toEnsuring[JwtFieldOptions] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val expiresSeconds: Long
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getField(__field: FieldDescriptor): PValue
- Definition Classes
- JwtFieldOptions → GeneratedMessage
- def getFieldByNumber(__fieldNumber: Int): Any
- Definition Classes
- JwtFieldOptions → GeneratedMessage
- val includeBearerTokenClaim: Seq[String]
- val includeParentClaims: Boolean
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val issuer: Seq[String]
- val name: String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def serializedSize: Int
- Definition Classes
- JwtFieldOptions → GeneratedMessage
- val staticClaim: Seq[JwtStaticClaim]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def toByteArray: Array[Byte]
- Definition Classes
- GeneratedMessage
- final def toByteString: ByteString
- Definition Classes
- GeneratedMessage
- final def toPMessage: PMessage
- Definition Classes
- GeneratedMessage
- def toProtoString: String
- Definition Classes
- JwtFieldOptions → GeneratedMessage
- val token: Boolean
- val unknownFields: UnknownFieldSet
- def update(ms: (Lens[JwtFieldOptions, JwtFieldOptions]) => Mutation[JwtFieldOptions]*): JwtFieldOptions
- Definition Classes
- Updatable
- 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()
- def withClaim(__v: JwtClaimInclude): JwtFieldOptions
- def withExpiresSeconds(__v: Long): JwtFieldOptions
- def withIncludeBearerTokenClaim(__v: Seq[String]): JwtFieldOptions
- def withIncludeParentClaims(__v: Boolean): JwtFieldOptions
- def withIssuer(__v: Seq[String]): JwtFieldOptions
- def withName(__v: String): JwtFieldOptions
- def withStaticClaim(__v: Seq[JwtStaticClaim]): JwtFieldOptions
- def withToken(__v: Boolean): JwtFieldOptions
- def withUnknownFields(__v: UnknownFieldSet): JwtFieldOptions
- final def writeDelimitedTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
- def writeTo(_output__: CodedOutputStream): Unit
- Definition Classes
- JwtFieldOptions → GeneratedMessage
- final def writeTo(output: OutputStream): Unit
- Definition Classes
- GeneratedMessage
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 JwtFieldOptions toStringFormat[JwtFieldOptions] 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,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (JwtFieldOptions, B)
- Implicit
- This member is added by an implicit conversion from JwtFieldOptions toArrowAssoc[JwtFieldOptions] 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.