Class IdentityUtils
java.lang.Object
org.cloudburstmc.netty.util.nethernet.IdentityUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetCanonicalFingerprintJson(String sdpOffer) Get the canonical fingerprint JSON from the SDP offerstatic org.jose4j.jwt.consumer.JwtContextvalidateIdentity(Identity identity) Validate the given identity against the known jwt signerstatic org.jose4j.jwt.JwtClaimsvalidateSdp(String sdpOffer) Validate the SDP offer against the embedded identity and known jwt signer This is designed into the spec to prevent MITM
-
Constructor Details
-
IdentityUtils
public IdentityUtils()
-
-
Method Details
-
validateIdentity
public static org.jose4j.jwt.consumer.JwtContext validateIdentity(Identity identity) throws org.jose4j.jwt.consumer.InvalidJwtException Validate the given identity against the known jwt signer- Parameters:
identity- The identity to validate- Returns:
- The JWT context if the identity is valid
- Throws:
org.jose4j.jwt.consumer.InvalidJwtException- If the identity is invalid
-
validateSdp
public static org.jose4j.jwt.JwtClaims validateSdp(String sdpOffer) throws org.jose4j.lang.JoseException, org.jose4j.jwt.consumer.InvalidJwtException Validate the SDP offer against the embedded identity and known jwt signer This is designed into the spec to prevent MITM- Parameters:
sdpOffer- The SDP offer to validate- Returns:
- The JWT claims if the SDP offer is valid
- Throws:
org.jose4j.lang.JoseException- If there is an error processing the SDP offerorg.jose4j.jwt.consumer.InvalidJwtException- If the SDP offer contains an invalid JWT
-
getCanonicalFingerprintJson
Get the canonical fingerprint JSON from the SDP offer- Parameters:
sdpOffer- The SDP offer to extract fingerprints from- Returns:
- The canonical fingerprint JSON
-