Class HttpAuthenticationService

java.lang.Object
com.mojang.authlib.HttpAuthenticationService
All Implemented Interfaces:
AuthenticationService
Direct Known Subclasses:
YggdrasilAuthenticationService

public abstract class HttpAuthenticationService extends Object implements AuthenticationService
  • Field Details

    • proxy

      private final Proxy proxy
  • Constructor Details

    • HttpAuthenticationService

      protected HttpAuthenticationService(Proxy proxy)
  • Method Details

    • getProxy

      public Proxy getProxy()
      Gets the proxy to be used with every HTTP(S) request.
      Returns:
      Proxy to be used.
    • constantURL

      public static URL constantURL(String url)
      Creates a URL with the specified string, throwing an Error if the URL was malformed.

      This is just a wrapper to allow URLs to be created in constants, where you know the URL is valid.

      Parameters:
      url - URL to construct
      Returns:
      URL constructed
    • buildQuery

      public static String buildQuery(Map<String,Object> query)
      Turns the specified Map into an encoded invalid input: '&' escaped query
      Parameters:
      query - Map to convert into a text based query
      Returns:
      Resulting query.
    • concatenateURL

      public static URL concatenateURL(URL url, String query)
      Concatenates the given URL and query.
      Parameters:
      url - URL to base off
      query - Query to append to URL
      Returns:
      URL constructed