Interface TokenTrust
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Decides whether the token in an offer's identity assertion is trusted.
This is only the first half of validating an offer. Whichever policy is chosen, the assertion's
detached JWS over the SDP fingerprints is still verified against the token's cpk, which
is what ties the identity to the DTLS certificate the peer presents.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classHolder so the shared consumer is built once. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TokenTrustReads the claims without checking who signed the token, for peers that cannot present a Minecraft-issued one, such as another proxy in the same fleet.static final TokenTrustVerifies the token against Minecraft's authorization service, which is what a retail client presents. -
Method Summary
-
Field Details
-
MINECRAFT_AUTH
Verifies the token against Minecraft's authorization service, which is what a retail client presents. This is the default. -
ANY
Reads the claims without checking who signed the token, for peers that cannot present a Minecraft-issued one, such as another proxy in the same fleet.The token must still carry an expiry and be within it, so a captured assertion cannot be replayed indefinitely, and the
cpkbinding still applies, so the peer must hold the key its token names. Nothing here establishes who the peer is, so pair it with an identity check of your own.
-
-
Method Details
-
claims
- Parameters:
identity- The identity taken from the offer- Returns:
- The token's claims, which must include
cpk - Throws:
Exception- If the token is not trusted
-