Class AuthEnv

java.lang.Object
org.apache.jena.http.auth.AuthEnv

public class AuthEnv extends Object
  • Field Details

    • LOG

      public static org.slf4j.Logger LOG
  • Method Details

    • get

      public static AuthEnv get()
    • registerUsernamePassword

      public void registerUsernamePassword(URI uri, String user, String password)
      Register (username, password) information for a URI endpoint.
    • hasRegistation

      public boolean hasRegistation(URI uri)
      Check whether there is a registration.
    • unregisterUsernamePassword

      public void unregisterUsernamePassword(URI uri)
      Register (username, password) information for a URI endpoint.
    • getUsernamePassword

      public PasswordRecord getUsernamePassword(URI uri)
      Return the (username, password) for a URI.

      If there is no exact match for the URI, then the information mapped from the longest prefix entry is returned.

    • clearActiveAuthentication

      public void clearActiveAuthentication()
    • clearAuthEnv

      public void clearAuthEnv()
      Clear all registrations.
    • addAuth

      public java.net.http.HttpRequest.Builder addAuth(java.net.http.HttpRequest.Builder requestBuilder, String uri)
      Add authentication, if in the authModifiers registry. That is, add the right headers, and for digest, calculate the new digest string.
    • registerBasicAuthModifier

      public void registerBasicAuthModifier(String url, String user, String password)
      Register the users/password which is to be used with basic auth at the given URL