Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data ConnectionSettings
- newtype ConnId = ConnId Unique
- defSettings :: ConnectionSettings
- defKeyspace :: Lens' ConnectionSettings (Maybe Keyspace)
- compression :: Lens' ConnectionSettings Compression
- tlsContext :: Lens' ConnectionSettings (Maybe SSLContext)
- newtype Milliseconds = Ms {}
- connectTimeout :: Lens' ConnectionSettings Milliseconds
- sendTimeout :: Lens' ConnectionSettings Milliseconds
- responseTimeout :: Lens' ConnectionSettings Milliseconds
- maxStreams :: Lens' ConnectionSettings Int
- maxRecvBuffer :: Lens' ConnectionSettings Int
- authenticators :: Lens' ConnectionSettings (HashMap AuthMechanism Authenticator)
- newtype AuthMechanism = AuthMechanism Text
- data Authenticator = Authenticator {
- authMechanism :: !AuthMechanism
- authOnRequest :: AuthContext -> IO (AuthResponse, s)
- authOnChallenge :: Maybe (s -> AuthChallenge -> IO (AuthResponse, s))
- authOnSuccess :: s -> AuthSuccess -> IO ()
- data AuthContext = AuthContext {
- _authConnId :: !ConnId
- _authHost :: !InetAddr
- authConnId :: Lens' AuthContext ConnId
- authHost :: Lens' AuthContext InetAddr
- passwordAuthenticator :: AuthUser -> AuthPass -> Authenticator
- newtype AuthUser = AuthUser Text
- newtype AuthPass = AuthPass Text
Documentation
data ConnectionSettings Source #
Timeouts
newtype Milliseconds Source #
Instances
Eq Milliseconds Source # | |
Defined in Database.CQL.IO.Connection.Settings (==) :: Milliseconds -> Milliseconds -> Bool # (/=) :: Milliseconds -> Milliseconds -> Bool # | |
Show Milliseconds Source # | |
Defined in Database.CQL.IO.Connection.Settings showsPrec :: Int -> Milliseconds -> ShowS # show :: Milliseconds -> String # showList :: [Milliseconds] -> ShowS # |
Limits
Authentication
newtype AuthMechanism Source #
The (unique) name of a SASL authentication mechanism.
In the case of Cassandra, this is currently always the fully-qualified
Java class name of the configured server-side IAuthenticator
implementation.
Instances
data Authenticator Source #
A client authentication handler.
The fields of an Authenticator
must implement the client-side
of an (SASL) authentication mechanism as follows:
- When a Cassandra server requests authentication on a new connection,
authOnRequest
is called with theAuthContext
of the connection. - If additional challenges are posed by the server,
authOnChallenge
is called, if available, otherwise anAuthenticationError
is thrown, i.e. every challenge must be answered. - Upon successful authentication
authOnSuccess
is called.
The existential type s
is chosen by an implementation and can
be used to thread arbitrary state through the sequence of callback
invocations during an authentication exchange.
See also: RFC4422 Authentication
Authenticator | |
|
data AuthContext Source #
Context information given to Authenticator
s when
the server requests authentication on a connection.
See authOnRequest
.
AuthContext | |
|
passwordAuthenticator :: AuthUser -> AuthPass -> Authenticator Source #
A password authentication handler for use with Cassandra's
PasswordAuthenticator
.