Package uk.ac.starlink.auth

# Class AuthConnection

java.lang.Object
uk.ac.starlink.auth.AuthConnection

public class AuthConnection extends Object
Aggregates a URLConnection and the AuthContext used to make the connection.

Since:
  7 Jul 2020
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`AuthConnection(URLConnection connection, AuthContext context)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`URLConnection`
`getConnection()`
Returns this object's URLConnection.
`AuthContext`
`getContext()`
Returns this objects AuthContext, as used to make the connection.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AuthConnection

public AuthConnection(URLConnection connection, AuthContext context)
Constructor.

Parameters:
  `connection` - URLConnection, not null
  `context` - auth context used to open connection

## Method Details

### getConnection

public URLConnection getConnection()
Returns this object's URLConnection.

Returns:
  connection, not null

### getContext

public AuthContext getContext()
Returns this objects AuthContext, as used to make the connection.

Returns:
  auth context, possibly null