Class Login

java.lang.Object
org.shredzone.acme4j.Login

public class Login
extends java.lang.Object
A Login is a Session that is connected to an Account at the ACME server. It contains the account's KeyPair and the URL of the account.

Note that Login objects are not serializable, as they contain a keypair and volatile data.

  • Constructor Details

    • Login

      public Login​(java.net.URL accountLocation, java.security.KeyPair keyPair, Session session)
      Creates a new Login.
      Parameters:
      accountLocation - Account location URL
      keyPair - KeyPair of the account
      session - Session to be used
  • Method Details

    • getSession

      public Session getSession()
      Gets the Session that is used.
    • getKeyPair

      public java.security.KeyPair getKeyPair()
      Gets the KeyPair of the ACME account.
    • getAccountLocation

      public java.net.URL getAccountLocation()
      Gets the location URL of the account.
    • getAccount

      public Account getAccount()
      Gets the Account that is bound to this login.
      Returns:
      Account bound to the login
    • bindAuthorization

      public Authorization bindAuthorization​(java.net.URL location)
      Creates a new instance of Authorization and binds it to this login.
      Parameters:
      location - Location of the Authorization
      Returns:
      Authorization bound to the login
    • bindCertificate

      public Certificate bindCertificate​(java.net.URL location)
      Creates a new instance of Certificate and binds it to this login.
      Parameters:
      location - Location of the Certificate
      Returns:
      Certificate bound to the login
    • bindOrder

      public Order bindOrder​(java.net.URL location)
      Creates a new instance of Order and binds it to this login.
      Parameters:
      location - Location URL of the order
      Returns:
      Order bound to the login
    • bindChallenge

      public Challenge bindChallenge​(java.net.URL location)
      Creates a new instance of Challenge and binds it to this login.
      Parameters:
      location - Location URL of the order
      Returns:
      Challenge bound to the login
      Since:
      2.8
    • createChallenge

      public Challenge createChallenge​(JSON data)
      Creates a Challenge instance for the given challenge data.
      Parameters:
      data - Challenge JSON data
      Returns:
      Challenge instance
    • setKeyPair

      protected void setKeyPair​(java.security.KeyPair keyPair)
      Sets a different KeyPair.