Package 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
- Author:
- Mark Taylor
-
Method Summary
Modifier and TypeMethodDescriptionReturns a name identifying this protocol.presentCredentials
(URL url, UserPass userpass) Makes a single attempt at acquiring a response from a login interface.
-
Method Details
-
presentCredentials
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 URLuserpass
- 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
-