uk.ac.starlink.auth

## 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

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getProtocolName()` Returns a name identifying this protocol.
    `java.net.HttpURLConnection` | `presentCredentials(java.net.URL url, UserPass userpass)` Makes a single attempt at acquiring a response from a login interface.

- - ### Method Detail

    - #### presentCredentials

          java.net.HttpURLConnection presentCredentials(java.net.URL url,
                                                        UserPass userpass)
                                                 throws java.io.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:
        `java.io.IOException` - if some communications failed

    - #### getProtocolName

          java.lang.String getProtocolName()

      Returns a name identifying this protocol.
      Returns:
        name