Class ScramMessageParser


  • public final class ScramMessageParser
    extends Object
    Parser for SCRAM protocol messages (RFC 5802) and HTTP authentication headers (RFC 7804). Thread-safe: all methods are stateless.
    • Method Detail

      • parseWwwAuthenticateScram

        public static ScramMessageParser.ScramChallengeParams parseWwwAuthenticateScram​(String headerValue)
        Parse SCRAM-specific parameters from a WWW-Authenticate or Authentication-Info header value. The header value should have the SCRAM-SHA-xxx prefix already stripped (or the full header).
      • validateNoncePrefix

        public static void validateNoncePrefix​(String clientNonce,
                                               String fullNonce)
        Validate that the full nonce starts with the client nonce.
      • validateGs2Header

        public static void validateGs2Header​(String message)
        Validate the gs2-header starts with "n" (no channel binding).