org.apache.hive.jdbc.saml

## Interface IJdbcBrowserClient

All Superinterfaces:
  AutoCloseable, Closeable

All Known Implementing Classes:
  HiveJdbcBrowserClient

    public interface IJdbcBrowserClient
    extends Closeable

Main interface which exposes the methods to do a browser based SSO flow from a JDBC connection.

### Nested Class Summary

Nested Classes
`static class` `IJdbcBrowserClient.HiveJdbcBrowserException`
`static class` `IJdbcBrowserClient.HiveJdbcBrowserServerResponse` Util class which can be used to parse the response received from the server.
`static class` `IJdbcBrowserClient.JdbcBrowserClientContext` Util class for encapsulating all the initialization context for the BrowserClient.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `doBrowserSSO()` Execute the browser actions to complete the SSO workflow.
`String` `getClientIdentifier()` Gets the client identifier to be used to set in the http header for the requests from this browser client.
`Integer` `getPort()` Gets the port on this localhost where this browser client is listening on.
`IJdbcBrowserClient.HiveJdbcBrowserServerResponse` `getServerResponse()` Returns the `IJdbcBrowserClient.HiveJdbcBrowserServerResponse` as received from the server on the port where this browser client is listening on.
`void` `init(IJdbcBrowserClient.JdbcBrowserClientContext context)` Initializes the browser client context.
`void` `startListening()` Start a webserver and bind to a port number as configued.

### Methods inherited from interface java.io.Closeable

`close`

### Method Detail

#### startListening

    void startListening()
                 throws IJdbcBrowserClient.HiveJdbcBrowserException

Start a webserver and bind to a port number as configued.

Throws:
  `IJdbcBrowserClient.HiveJdbcBrowserException`

#### doBrowserSSO

    void doBrowserSSO()
               throws IJdbcBrowserClient.HiveJdbcBrowserException

Execute the browser actions to complete the SSO workflow. This method assumes that the `init(JdbcBrowserClientContext)` method has been called already to initialize the state needed for doing the browser based flow.

Throws:
  `IJdbcBrowserClient.HiveJdbcBrowserException` - in case of any errors to instantiate or execute browser flow.

#### init

    void init(IJdbcBrowserClient.JdbcBrowserClientContext context)

Initializes the browser client context. The client context contains a client identifier which must be used to set the http header with key `HiveSamlUtils.SSO_CLIENT_IDENTIFIER`.

#### getPort

    Integer getPort()

Gets the port on this localhost where this browser client is listening on.

#### getServerResponse

    IJdbcBrowserClient.HiveJdbcBrowserServerResponse getServerResponse()

Returns the `IJdbcBrowserClient.HiveJdbcBrowserServerResponse` as received from the server on the port where this browser client is listening on.

#### getClientIdentifier

    String getClientIdentifier()

Gets the client identifier to be used to set in the http header for the requests from this browser client.