Class Utils

java.lang.Object
io.meeds.oauth2.server.util.Utils

public class Utils extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
    Most bytes read of a Client ID Metadata Document: a JSON document of a few hundred bytes, far below this bound.
    static final String
     
    static final Duration
    Longest wait for a connection to a URL a client gives.
    static final String
    Name of the fetcher of the URLs a client gives, and of its deadline thread.
    static final String
    User-Agent of the fetches of the URLs a client gives.
    static final Duration
    Longest wait between two reads of a URL a client gives.
    static final Duration
    Longest read of a URL a client gives.
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.meeds.commons.http.SafeFetchPolicyBuilder
    urlFetchPolicy(long maxBytes)
    The policy under which the server reads a URL a client gives — the Client ID Metadata Document a client_id names, the logo a client declares: https on port 443, public addresses only, judged by the HTTP client's own resolver at every connection, no redirect followed, the timeouts above.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • OFFLINE_ACCESS_SCOPE

      public static final String OFFLINE_ACCESS_SCOPE
      See Also:
    • CIMD_MAX_BYTES

      public static final long CIMD_MAX_BYTES
      Most bytes read of a Client ID Metadata Document: a JSON document of a few hundred bytes, far below this bound.
      See Also:
    • URL_FETCHER_NAME

      public static final String URL_FETCHER_NAME
      Name of the fetcher of the URLs a client gives, and of its deadline thread.
      See Also:
    • URL_FETCHER_USER_AGENT

      public static final String URL_FETCHER_USER_AGENT
      User-Agent of the fetches of the URLs a client gives.
      See Also:
    • URL_CONNECT_TIMEOUT

      public static final Duration URL_CONNECT_TIMEOUT
      Longest wait for a connection to a URL a client gives.
    • URL_READ_TIMEOUT

      public static final Duration URL_READ_TIMEOUT
      Longest wait between two reads of a URL a client gives.
    • URL_TOTAL_TIMEOUT

      public static final Duration URL_TOTAL_TIMEOUT
      Longest read of a URL a client gives.
  • Method Details

    • urlFetchPolicy

      public static io.meeds.commons.http.SafeFetchPolicyBuilder urlFetchPolicy(long maxBytes)
      The policy under which the server reads a URL a client gives — the Client ID Metadata Document a client_id names, the logo a client declares: https on port 443, public addresses only, judged by the HTTP client's own resolver at every connection, no redirect followed, the timeouts above.
      Parameters:
      maxBytes - the most bytes a read takes, the largest of the reads made under this policy
      Returns:
      the policy's builder, for a test to replace the resolver