Class ClaimsUtils

java.lang.Object
io.micronaut.security.token.ClaimsUtils

@Internal public final class ClaimsUtils extends Object
Utility class to compare claims.
Since:
4.12.0
Author:
Sergio del Amo
  • Method Details

    • endsWithIgnoringProtocolAndTrailingSlash

      public static boolean endsWithIgnoringProtocolAndTrailingSlash(@NonNull @NonNull String expectedClaim, @NonNull @NonNull String claim)
      For example, for input "https://idcs-214ecfa9143532ca8c3fba0ecb1fe65b.identity.oraclecloud.com" and identity.oraclecloud.com, it returns true.
      Parameters:
      expectedClaim - Expected Claim
      claim - Claim
      Returns:
      Whether the expected claim ends with the supplied claim. Both claims are compared without leading protocol and trailing slash.