Class SamlPostBindingMessage
java.lang.Object
com.revetsec.saml.SamlPostBindingMessage
An opaque untrusted SAML HTTP-POST message. Binding parsing is not XML parsing, signature validation,
authentication, or permission to use RelayState as a redirect target. Retain the original form body and
header multiplicity when calling
fromFormBodyResult(byte[], List, String).- Since:
- 1.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe form field that carries the untrusted message. -
Method Summary
Modifier and TypeMethodDescriptionfromFormBodyResult(byte @NonNull [] body, @NonNull List<@NonNull String> contentTypeValues, @Nullable String rawQuery) Decodes the original form body with strict UTF-8, multiplicity, MIME and Base64 checks.fromLogoutFormBodyResult(byte @NonNull [] body, @NonNull List<@NonNull String> contentTypeValues, @Nullable String rawQuery) Decodes exactly one SAMLRequest or SAMLResponse and optional RelayState at a logout endpoint.getKind()Returns the untrusted form-field kind.Returns the untrusted RelayState value without interpreting it as a URL.toString()Redacts the decoded XML and RelayState.
-
Method Details
-
fromFormBodyResult
public static @NonNull SamlPostBindingParseResult fromFormBodyResult(byte @NonNull [] body, @NonNull List<@NonNull String> contentTypeValues, @Nullable String rawQuery) Decodes the original form body with strict UTF-8, multiplicity, MIME and Base64 checks. The decoded form value must be canonical padded standard Base64, allowing at most 4096 ASCII spaces, tabs, carriage returns or line feeds anywhere in that value. Padding is required for partial quanta and unused pad bits must be zero; URL-safe Base64 is rejected. Form decoding happens once: a literal Base64 plus must be percent-encoded as%2B.- Parameters:
body- original HTTP request bodycontentTypeValues- all Content-Type field valuesrawQuery- original query string, or null when absent- Returns:
- a parsed untrusted message or a fixed rejection
- Since:
- 1.0.0
-
fromLogoutFormBodyResult
public static @NonNull SamlPostBindingParseResult fromLogoutFormBodyResult(byte @NonNull [] body, @NonNull List<@NonNull String> contentTypeValues, @Nullable String rawQuery) Decodes exactly one SAMLRequest or SAMLResponse and optional RelayState at a logout endpoint. XML and signatures remain unverified. The login factory continues to accept only SAMLResponse. Both message kinds use the same bounded canonical Base64 grammar asfromFormBodyResult(byte[], List, String).- Parameters:
body- original HTTP request bodycontentTypeValues- all Content-Type field valuesrawQuery- original query string, or null when absent- Returns:
- a parsed untrusted logout message or a fixed rejection
- Since:
- 1.0.0
-
getRelayState
Returns the untrusted RelayState value without interpreting it as a URL.- Returns:
- the opaque RelayState value, if present
- Since:
- 1.0.0
-
getKind
Returns the untrusted form-field kind.- Returns:
- message kind
- Since:
- 1.0.0
-
toString
-