jots
Members list
Type members
Classlikes
Attributes
- Companion
- class
- Source
- AcceptedAudiences.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
AcceptedAudiences.type
The audiences (aud) accepted when verifying tokens.
The audiences (aud) accepted when verifying tokens.
- AcceptedAudiences.none rejects tokens with an audience, while tokens without an audience are accepted. This is the default. - AcceptedAudiences.any accepts tokens with any audience, and tokens without an audience. - AcceptedAudiences(audience, audiences*) accepts tokens with at least one of the audiences, while other tokens are rejected.
Rejecting tokens with an audience by default follows the JWT specification, which requires tokens to be rejected when the audience is not recognized (RFC 7519 section 4.1.3).
Attributes
- Companion
- object
- Source
- AcceptedAudiences.scala
- Supertypes
-
class Objecttrait Matchableclass Any
The issuers (iss) accepted when verifying tokens.
The issuers (iss) accepted when verifying tokens.
- AcceptedIssuers.any accepts tokens with any issuer, and tokens without an issuer. This is the default. - AcceptedIssuers(issuer, issuers*) accepts tokens with one of the issuers, while other tokens are rejected.
Attributes
- Companion
- object
- Source
- AcceptedIssuers.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- AcceptedIssuers.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
AcceptedIssuers.type
The subjects (sub) accepted when verifying tokens.
The subjects (sub) accepted when verifying tokens.
- AcceptedSubjects.any accepts tokens with any subject, and tokens without a subject. This is the default. - AcceptedSubjects(subject, subjects*) accepts tokens with one of the subjects, while other tokens are rejected.
Attributes
- Companion
- object
- Source
- AcceptedSubjects.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- AcceptedSubjects.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
AcceptedSubjects.type
The types (typ) accepted when verifying tokens.
The types (typ) accepted when verifying tokens.
- AcceptedTypes.any accepts tokens with any type, and tokens without a type. This is the default. - AcceptedTypes(type, types*) accepts tokens with one of the types, while other tokens are rejected.
Types are media types compared case-insensitively, where types without a / have an implied application/ prefix. This means JWT accepts the types JWT, jwt, and application/jwt.
Attributes
- Companion
- object
- Source
- AcceptedTypes.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- AcceptedTypes.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
AcceptedTypes.type
Attributes
- Companion
- class
- Source
- JwkKeyId.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JwkKeyId.type
The key type used to identify the type of key for a Jwk.
Attributes
- Companion
- object
- Source
- JwkKeyType.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- JwkKeyType.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JwkKeyType.type
Attributes
- Companion
- class
- Source
- JwkSet.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JwkSet.type
Represents a set of keys known as a JSON Web Key Set (JWK Set).
Represents a set of keys known as a JSON Web Key Set (JWK Set).
Attributes
- Companion
- object
- Source
- JwkSet.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- JwtAlgorithm.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JwtAlgorithm.type
Represents a cryptographic algorithm for JWT signatures.
Represents a cryptographic algorithm for JWT signatures.
Attributes
- Companion
- object
- Source
- JwtAlgorithm.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class JwtAsymmetricAlgorithmclass JwtEcdsaAlgorithmclass JwtEddsaAlgorithmclass JwtRsaAlgorithmclass JwtHmacAlgorithm
Represents a cryptographic asymmetric algorithm for JWT signatures.
Represents a cryptographic asymmetric algorithm for JWT signatures.
Attributes
- Companion
- object
- Source
- JwtAlgorithm.scala
- Supertypes
- Known subtypes
Attributes
- Companion
- class
- Source
- JwtAlgorithm.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
Attributes
- Companion
- class
- Source
- JwtBuilder.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JwtBuilder.type
Represents a JWT being constructed, prior to signing.
Represents a JWT being constructed, prior to signing.
Attributes
- Companion
- object
- Source
- JwtBuilder.scala
- Supertypes
-
class Objecttrait Matchableclass Any
The claims of a JWT being constructed, prior to signing.
The claims of a JWT being constructed, prior to signing.
Attributes
- Companion
- object
- Source
- JwtClaims.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- JwtClaims.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JwtClaims.type
Attributes
- Companion
- trait
- Source
- JwtDecoder.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JwtDecoder.type
Decodes VerifiedJwts to instances of type A.
Decodes VerifiedJwts to instances of type A.
A common approach is to decode VerifiedJwt claims to type A. This can be done by defining a Decoder instance and using JwtDecoder.decodeClaims.
Attributes
- Companion
- object
- Source
- JwtDecoder.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JwtDecoder[A]
Attributes
- Companion
- class
- Source
- JwtAlgorithm.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JwtEcdsaAlgorithm.type
Represents an Elliptic Curve Digital Signature Algorithm (ECDSA) for JWT signatures.
Represents an Elliptic Curve Digital Signature Algorithm (ECDSA) for JWT signatures.
Attributes
- Companion
- object
- Source
- JwtAlgorithm.scala
- Supertypes
Attributes
- Companion
- class
- Source
- JwtAlgorithm.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JwtEddsaAlgorithm.type
Represents an Edwards-curve Digital Signature Algorithm (EdDSA) for JWT signatures.
Represents an Edwards-curve Digital Signature Algorithm (EdDSA) for JWT signatures.
Attributes
- Companion
- object
- Source
- JwtAlgorithm.scala
- Supertypes
Encodes instances of type A to JwtBuilders.
Encodes instances of type A to JwtBuilders.
A common approach is to encode instances of type A as the claims of a JwtBuilder. This can be done by defining an Encoder.AsObject instance and then using JwtEncoder.encodeClaims.
Attributes
- Companion
- object
- Source
- JwtEncoder.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JwtEncoder[A]
Attributes
- Companion
- trait
- Source
- JwtEncoder.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JwtEncoder.type
Attributes
- Companion
- class
- Source
- JwtException.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JwtException.type
Exception raised when there is an issue relating to JWTs.
Exception raised when there is an issue relating to JWTs.
Attributes
- Companion
- object
- Source
- JwtException.scala
- Supertypes
-
trait NoStackTraceclass RuntimeExceptionclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class EmptyKeySetclass InvalidAlgorithmclass InvalidAudienceclass InvalidCriticalHeadersclass InvalidEcKeyLengthclass InvalidEddsaKeyLengthclass InvalidExpirationclass InvalidIssuedAtclass InvalidIssuerclass InvalidJwkclass InvalidJwkSetclass InvalidJwtSignatureclass InvalidKeyAlgorithmclass InvalidKeyIdclass InvalidKeyTypeclass InvalidNotBeforeclass InvalidPrivateKeyclass InvalidPublicKeyclass InvalidRsaKeyLengthclass InvalidSecretKeyclass InvalidSecretKeyLengthclass InvalidSignatureclass InvalidSignedJwtclass InvalidSignedJwtClaimsclass InvalidSignedJwtHeaderclass InvalidSubjectclass InvalidTypeclass MissingAlgorithmclass MissingAudienceclass MissingCriticalHeaderclass MissingExpirationclass MissingIssuedAtclass MissingIssuerclass MissingKeyclass MissingKeyIdclass MissingKeyTypeclass MissingNotBeforeclass MissingSubjectclass MissingTypeclass NoAcceptedAlgorithmsclass RejectedAlgorithmclass RejectedAudienceclass RejectedIssuerclass RejectedKeyAlgorithmclass RejectedSubjectclass RejectedTypeclass TokenExpiredclass TokenNotYetIssuedclass TokenNotYetValidclass UnexpectedAudienceclass UnsuitableSigningKeyclass UnsupportedKeyclass UnsupportedKeyTypeShow all
Attributes
- Companion
- class
- Source
- JwtHeader.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JwtHeader.type
The header of a JWT being constructed, prior to signing.
The header of a JWT being constructed, prior to signing.
Attributes
- Companion
- object
- Source
- JwtHeader.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- JwtAlgorithm.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JwtHmacAlgorithm.type
Represents a Hash-based Message Authentication Code (HMAC) algorithm for JWT signatures.
Represents a Hash-based Message Authentication Code (HMAC) algorithm for JWT signatures.
Attributes
- Companion
- object
- Source
- JwtAlgorithm.scala
- Supertypes
Attributes
- Companion
- trait
- Source
- JwtJwkSetVerification.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
JwtVerification using the keys in a JwkSet, created using the jwkSet functions on JwtVerificationBuilder.
JwtVerification using the keys in a JwkSet, created using the jwkSet functions on JwtVerificationBuilder.
Attributes
- Companion
- object
- Source
- JwtJwkSetVerification.scala
- Supertypes
Attributes
- Companion
- class
- Source
- JwtAlgorithm.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JwtRsaAlgorithm.type
Represents an RSA (Rivest–Shamir–Adleman) algorithm for JWT signatures.
Represents an RSA (Rivest–Shamir–Adleman) algorithm for JWT signatures.
Attributes
- Companion
- object
- Source
- JwtAlgorithm.scala
- Supertypes
The bytes constituting the signature part of a SignedJwt.
The bytes constituting the signature part of a SignedJwt.
JwtSignatures are usually created with JwtSignature.fromMac from jots.crypto.Macs, or using JwtSignature.fromSignature from jots.crypto.Signatures when creating tokens. When parsing existing signatures, JwtSignature.fromString is available.
The JwtSignature should generally not be trusted unless it is part of a VerifiedJwt, so the signature is verified.
Note it is possible for signatures to be empty. However, no default JwtSigning will emit empty signatures. Similarly, all default JwtVerifications will reject empty signatures.
Attributes
- Companion
- object
- Source
- JwtSignature.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- JwtSignature.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
JwtSignature.type
Attributes
- Companion
- trait
- Source
- JwtSigning.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JwtSigning.type
Capability to sign JwtBuilders and return SignedJwts.
Capability to sign JwtBuilders and return SignedJwts.
Signing JwtBuilders requires specifying the algorithm to use and a jots.crypto.PrivateKey or jots.crypto.SecretKey. The key requirements of the algorithm are checked by default, but this can be customized using JwtSigningBuilder.
The default JwtSigning instances will set the algorithm in the header of the JwtBuilder before signing, to ensure it matches with the actual signing algorithm.
It is possible to implement custom JwtSigning instances, for example for testing purposes. The bytes which should be signed are provided by JwtBuilder#signingBytes.
Attributes
- Companion
- object
- Source
- JwtSigning.scala
- Supertypes
-
class Objecttrait Matchableclass Any
JwtSigning builder which allows customizing signing checks.
JwtSigning builder which allows customizing signing checks.
The default instance checks that the private or secret key meets the key requirements of the algorithm being used, as detailed by checkKeyRequirements.
Attributes
- Companion
- object
- Source
- JwtSigningBuilder.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- JwtSigningBuilder.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JwtSigningBuilder.type
Attributes
- Companion
- trait
- Source
- JwtVerification.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
JwtVerification.type
Capability to verify SignedJwts and return VerifiedJwts.
Capability to verify SignedJwts and return VerifiedJwts.
Verifying SignedJwts requires specifying one or more algorithms, and either a jots.crypto.PublicKey or jots.crypto.SecretKey. Use JwtVerificationBuilder to create instances and customize the claims verification.
It is possible to create custom JwtVerification instances, but these will generally have to make use of a default implementation. This stems from the fact that VerifiedJwts can only be created by the default implementations. The notable exception is that the testing module allows verifying any SignedJwt.
Attributes
- Companion
- object
- Source
- JwtVerification.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait RefreshingJwtVerification[F]trait JwtJwkSetVerification[F]
JwtVerification builder that allows customizing verification.
JwtVerification builder that allows customizing verification.
The default instances perform the following verifications.
- Public and secret keys must meet the key requirement of the algorithm used, as detailed by JwtVerificationBuilder#checkKeyRequirements. - If the token has an audience (aud), then the token is rejected, since the default accepted audiences are AcceptedAudiences.none. Use the withAcceptedAudiences function to specify the accepted audiences. - The expiration (exp), when present, is verified to be in the future. - The not-before (nbf), when present, is verified to not be in the future. - If the token contains a crit header, then the token is rejected. The withCriticalHeaders function can be used to specify the set of accepted critical headers.
The expiration (exp) and not-before (nbf) claims are only verified when present. Their presence can additionally be required, in which case a token missing the claim is rejected.
The verifications above are in addition to verifying the signature and, while not recommended, can be explicitly disabled. It is also recommended to enable additional verifications when appropriate.
For even more verifications, resort to custom JwtVerifications.
Attributes
- Companion
- object
- Source
- JwtVerificationBuilder.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- JwtVerificationBuilder.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Attributes
- Companion
- class
- Source
- SignedJwt.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
SignedJwt.type
A signed JSON Web Token (JWT) which has not been verified.
A signed JSON Web Token (JWT) which has not been verified.
The String representation is either parsed or generated by using e.g. JwtBuilder#signWith. Unlike JwtBuilder, the SignedJwt does not allow for modifications.
The SignedJwt should generally not be trusted unless it is part of a VerifiedJwt. A SignedJwt can be verified by using the SignedJwt#verifyWith method.
Attributes
- Companion
- object
- Source
- SignedJwt.scala
- Supertypes
-
class Objecttrait Matchableclass Any
A JwtClaims together with its String representation.
A JwtClaims together with its String representation.
The String representation is either parsed or generated by using e.g. JwtClaims#toSigned. Unlike JwtClaims, the SignedJwtClaims does not allow for modifications.
The SignedJwtClaims should generally not be trusted unless it is part of a VerifiedJwt, so the signature is verified.
Attributes
- Companion
- object
- Source
- SignedJwtClaims.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- SignedJwtClaims.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
SignedJwtClaims.type
Attributes
- Companion
- class
- Source
- SignedJwtHeader.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
SignedJwtHeader.type
A JwtHeader together with its String representation.
A JwtHeader together with its String representation.
The String representation is either parsed or generated by using e.g. JwtHeader#toSigned. Unlike JwtHeader, the SignedJwtHeader does not allow for modifications.
The SignedJwtHeader should generally not be trusted unless it is part of a VerifiedJwt, so the signature is verified.
Attributes
- Companion
- object
- Source
- SignedJwtHeader.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- class
- Source
- VerifiedJwt.scala
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
VerifiedJwt.type
A SignedJwt for which the signature has been verified as valid.
A SignedJwt for which the signature has been verified as valid.
Token verification typically also includes verifying that claims are valid, although this is optional and depends on the use case.
VerifiedJwts can only be created by the default implementations of JwtVerification. The notable exception is the testing module which allows to create a VerifiedJwt from any SignedJwt.
Attributes
- Companion
- object
- Source
- VerifiedJwt.scala
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Source
- literals.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
literals.type
Attributes
- Source
- syntax.scala
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
syntax.type