org.apache.hive.jdbc.saml

## Class HiveJdbcSamlRedirectStrategy

- java.lang.Object
- - org.apache.http.impl.client.DefaultRedirectStrategy
  - - org.apache.hive.jdbc.saml.HiveJdbcSamlRedirectStrategy

All Implemented Interfaces:
  org.apache.http.client.RedirectStrategy

    public class HiveJdbcSamlRedirectStrategy
    extends org.apache.http.impl.client.DefaultRedirectStrategy

This is an implementation of `RedirectStrategy` to intercept the HTTP redirect response received from the server in a browser mode auth flow. This is mainly used to get the redirect URL from the HTTP redirect response since HttpThrift client does not expose such information when the server throws a HTTP 302 redirect as response. The redirect URL is then used to initialize the `IJdbcBrowserClient` so that it can do the browser based SSO.

### Field Summary

### Fields inherited from class org.apache.http.impl.client.DefaultRedirectStrategy

`INSTANCE, REDIRECT_LOCATIONS, SC_PERMANENT_REDIRECT`

### Constructor Summary

Constructors
Constructor and Description
`HiveJdbcSamlRedirectStrategy(IJdbcBrowserClient browserClient)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `isRedirected(org.apache.http.HttpRequest request, org.apache.http.HttpResponse response, org.apache.http.protocol.HttpContext context)`

### Methods inherited from class org.apache.http.impl.client.DefaultRedirectStrategy

`createLocationURI, getLocationURI, getRedirect, isRedirectable`

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

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

### Constructor Detail

#### HiveJdbcSamlRedirectStrategy

    public HiveJdbcSamlRedirectStrategy(IJdbcBrowserClient browserClient)

### Method Detail

#### isRedirected

    public boolean isRedirected(org.apache.http.HttpRequest request,
                                org.apache.http.HttpResponse response,
                                org.apache.http.protocol.HttpContext context)
                         throws org.apache.http.ProtocolException

Specified by:
  `isRedirected` in interface `org.apache.http.client.RedirectStrategy`
Overrides:
  `isRedirected` in class `org.apache.http.impl.client.DefaultRedirectStrategy`
Throws:
  `org.apache.http.ProtocolException`