Package net.snowflake.client.core

## Class SessionUtilExternalBrowser

- java.lang.Object
- - net.snowflake.client.core.SessionUtilExternalBrowser

    public class SessionUtilExternalBrowser
    extends Object

SAML 2.0 Compliant service/application federated authentication 1. Query GS to obtain IDP SSO url 2. Listen a localhost port to accept Saml response 3. Open a browser in the backend so that the user can type IdP username and password. 4. Return token and proof key to the GS to gain access.

### Nested Class Summary

Nested Classes
`static interface` `SessionUtilExternalBrowser.AuthExternalBrowserHandlers`
`static class` `SessionUtilExternalBrowser.DefaultAuthExternalBrowserHandlers`

### Constructor Summary

Constructors
`SessionUtilExternalBrowser​(SFLoginInput loginInput, SessionUtilExternalBrowser.AuthExternalBrowserHandlers handlers)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static SessionUtilExternalBrowser` `createInstance​(SFLoginInput loginInput)`
`protected int` `getLocalPort​(ServerSocket ssocket)` Get a port listening
`protected ServerSocket` `getServerSocket()` Gets a free port on localhost

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

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

### Constructor Detail

#### SessionUtilExternalBrowser

    public SessionUtilExternalBrowser​(SFLoginInput loginInput,
                                      SessionUtilExternalBrowser.AuthExternalBrowserHandlers handlers)

### Method Detail

#### createInstance

    public static SessionUtilExternalBrowser createInstance​(SFLoginInput loginInput)

#### getServerSocket

    protected ServerSocket getServerSocket()
                                    throws SFException

Gets a free port on localhost

Returns:
  port number
Throws:
  `SFException` - raised if an error occurs.

#### getLocalPort

    protected int getLocalPort​(ServerSocket ssocket)

Get a port listening

Parameters:
  `ssocket` - server socket
Returns:
  port number