Interface LoginProtocol

All Known Implementing Classes:
IvoaLoginProtocol

public interface LoginProtocol
Defines a way to present credentials for the purpose of subsequent access to a service. This interface does not know anything about how to interpret the response from such a presentation.
Since:
10 Dec 2021
Author:
Mark Taylor
  • Method Details

    • presentCredentials

      HttpURLConnection presentCredentials(URL url, UserPass userpass) throws IOException
      Makes a single attempt at acquiring a response from a login interface. The return value is an open URL connection ready for reading. It is not guaranteed to represent successful authentication; success or failure should be diagnosed based on its content, for instance the HTTP status code.
      Parameters:
      url - target URL
      userpass - credentials supplied by user
      Returns:
      open URL connection
      Throws:
      IOException - if some communications failed
    • getProtocolName

      String getProtocolName()
      Returns a name identifying this protocol.
      Returns:
      name