Class OAuthStoreKey

java.lang.Object
com.revetsec.oauth.server.OAuthStoreKey

@Immutable @CheckReturnValue public final class OAuthStoreKey extends Object
Opaque issuer storage address. Reconstruction checks syntax and grants no protocol authority. Persist the exact storage string; identifiers are sensitive and diagnostics redact them.
Since:
1.0.0
Author:
Mark Allen
  • Method Details

    • fromStoredForm

      public static @NonNull OAuthStoreKey fromStoredForm(@NonNull String storageKey)
      Reconstructs a storage address, bounded to 256 ASCII characters and the current canonical format. The issuer checks its namespace before using this address. This does not authenticate a record.
      Parameters:
      storageKey - the exact persisted address
      Returns:
      the bounded address
      Throws:
      NullPointerException - if the argument is null
      IllegalArgumentException - if its format is invalid
      Since:
      1.0.0
    • getStorageKey

      Releases the sensitive opaque address for persistence; never log it.
      Returns:
      the exact storage address
      Since:
      1.0.0
    • getKind

      Returns the storage record kind, which alone confers no authority.
      Returns:
      the record kind
      Since:
      1.0.0
    • equals

      public boolean equals(@Nullable Object other)
      Compares exact storage addresses.
      Overrides:
      equals in class Object
      Parameters:
      other - the possible address
      Returns:
      whether the addresses are equal
      Since:
      1.0.0
    • hashCode

      public int hashCode()
      Returns the exact address hash.
      Overrides:
      hashCode in class Object
      Returns:
      the address hash
      Since:
      1.0.0
    • toString

      Redacts the address.
      Overrides:
      toString in class Object
      Returns:
      a fixed description
      Since:
      1.0.0