Class OperationBinding
java.lang.Object
com.revetsec.OperationBinding
Bounded application-held correlation secret for selected WebAuthn and TOTP operations.
The binding is not identity, permission, freshness, uniqueness or a one-use authorization grant. Applications still authorize the current session/action and atomically consume their own pending state. WebAuthn retains its canonical 43-character boundary; TOTP retains its historical nonempty, well-formed 1,024-code-unit boundary.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Field Summary
FieldsModifier and TypeFieldDescriptionMaximum trusted-persistence spelling retained for the TOTP compatibility profile. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull OperationBindingfresh()Generates a fresh 32-byte correlation secret in canonical unpadded Base64URL form.static @NonNull OperationBindingfromTrustedPersistence(@NonNull String value) Restores an exact TOTP-compatible value from application-controlled trusted persistence.Emits the correlation secret for protected persistence, an affected Revetsec operation or exact comparison.toString()
-
Field Details
-
MAXIMUM_CODE_UNITS
Maximum trusted-persistence spelling retained for the TOTP compatibility profile.- Since:
- 1.0.0
-
-
Method Details
-
fresh
Generates a fresh 32-byte correlation secret in canonical unpadded Base64URL form.- Returns:
- a fresh 43-character binding
- Since:
- 1.0.0
-
fromTrustedPersistence
@CheckReturnValue public static @NonNull OperationBinding fromTrustedPersistence(@NonNull String value) Restores an exact TOTP-compatible value from application-controlled trusted persistence. This is not a parser for untrusted browser or request input.- Parameters:
value- exact persisted correlation secret- Returns:
- the bounded exact value
- Throws:
IllegalArgumentException- if empty, longer than 1,024 Java UTF-16 code units or not well-formed UTF-16- Since:
- 1.0.0
-
toSecretString
Emits the correlation secret for protected persistence, an affected Revetsec operation or exact comparison. Never log, diagnose or expose this value to a browser response.- Returns:
- the exact secret spelling
- Since:
- 1.0.0
-
toString
-