Interface Cookie


public interface Cookie
An object encapsulating an HTTP cookie. The cookies are used to be able to access protected resources (such the FIDO UAF registration endpoints).
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    static Cookie
    create(URI url, String setCookieHeaderValue)
    Creates a cookie.
    The String representation of the cookie as described in section 4.1.1 of the RFC 6265.
    url()
    The URL of the cookie.
  • Method Details

    • toString

      @NonNull String toString()
      The String representation of the cookie as described in section 4.1.1 of the RFC 6265.
      Overrides:
      toString in class Object
      Returns:
      the String representation of the cookie
    • url

      URI url()
      The URL of the cookie. You can provide the baseUrl of the SDK Configuration (Configuration.baseUrl()) as cookie URL.
      Returns:
      the URL
    • create

      static Cookie create(URI url, String setCookieHeaderValue)
      Creates a cookie.
      Parameters:
      url - the request URL
      setCookieHeaderValue - the value of the Set-Cookie HTTP header containing the cookie
      Returns:
      the cookie
      Throws:
      IllegalArgumentException - if the provided cookie header value is not conform with the RFC or if the cookie cannot be used in the provided URL