Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
AuthDomainDigest
handles the server side of HTTP "Digest"
authentication.
Synopsis
- newtype AuthDomainDigest = AuthDomainDigest (ManagedPtr AuthDomainDigest)
- class (GObject o, IsDescendantOf AuthDomainDigest o) => IsAuthDomainDigest o
- toAuthDomainDigest :: (MonadIO m, IsAuthDomainDigest o) => o -> m AuthDomainDigest
- authDomainDigestEncodePassword :: (HasCallStack, MonadIO m) => Text -> Text -> Text -> m Text
- authDomainDigestSetAuthCallback :: (HasCallStack, MonadIO m, IsAuthDomainDigest a) => a -> AuthDomainDigestAuthCallback -> m ()
- clearAuthDomainDigestAuthCallback :: (MonadIO m, IsAuthDomainDigest o) => o -> m ()
- constructAuthDomainDigestAuthCallback :: (IsAuthDomainDigest o, MonadIO m) => FunPtr C_AuthDomainDigestAuthCallback -> m (GValueConstruct o)
- getAuthDomainDigestAuthCallback :: (MonadIO m, IsAuthDomainDigest o) => o -> m (Maybe AuthDomainDigestAuthCallback_WithClosures)
- setAuthDomainDigestAuthCallback :: (MonadIO m, IsAuthDomainDigest o) => o -> FunPtr C_AuthDomainDigestAuthCallback -> m ()
- constructAuthDomainDigestAuthData :: (IsAuthDomainDigest o, MonadIO m) => Ptr () -> m (GValueConstruct o)
- getAuthDomainDigestAuthData :: (MonadIO m, IsAuthDomainDigest o) => o -> m (Ptr ())
- setAuthDomainDigestAuthData :: (MonadIO m, IsAuthDomainDigest o) => o -> Ptr () -> m ()
Exported types
newtype AuthDomainDigest Source #
Memory-managed wrapper type.
AuthDomainDigest (ManagedPtr AuthDomainDigest) |
Instances
Eq AuthDomainDigest Source # | |
Defined in GI.Soup.Objects.AuthDomainDigest (==) :: AuthDomainDigest -> AuthDomainDigest -> Bool # (/=) :: AuthDomainDigest -> AuthDomainDigest -> Bool # | |
GObject AuthDomainDigest Source # | |
Defined in GI.Soup.Objects.AuthDomainDigest | |
ManagedPtrNewtype AuthDomainDigest Source # | |
Defined in GI.Soup.Objects.AuthDomainDigest toManagedPtr :: AuthDomainDigest -> ManagedPtr AuthDomainDigest | |
TypedObject AuthDomainDigest Source # | |
Defined in GI.Soup.Objects.AuthDomainDigest | |
HasParentTypes AuthDomainDigest Source # | |
Defined in GI.Soup.Objects.AuthDomainDigest | |
IsGValue (Maybe AuthDomainDigest) Source # | Convert |
Defined in GI.Soup.Objects.AuthDomainDigest gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe AuthDomainDigest -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe AuthDomainDigest) | |
type ParentTypes AuthDomainDigest Source # | |
Defined in GI.Soup.Objects.AuthDomainDigest |
class (GObject o, IsDescendantOf AuthDomainDigest o) => IsAuthDomainDigest o Source #
Type class for types which can be safely cast to AuthDomainDigest
, for instance with toAuthDomainDigest
.
Instances
(GObject o, IsDescendantOf AuthDomainDigest o) => IsAuthDomainDigest o Source # | |
Defined in GI.Soup.Objects.AuthDomainDigest |
toAuthDomainDigest :: (MonadIO m, IsAuthDomainDigest o) => o -> m AuthDomainDigest Source #
Cast to AuthDomainDigest
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
accepts, addPath, bindProperty, bindPropertyFull, challenge, checkPassword, covers, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, removePath, runDispose, stealData, stealQdata, thawNotify, tryGenericAuthCallback, unref, watchClosure.
Getters
getData, getProperty, getQdata, getRealm.
Setters
setAuthCallback, setData, setDataFull, setFilter, setGenericAuthCallback, setProperty.
encodePassword
authDomainDigestEncodePassword Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Text |
|
-> Text |
|
-> m Text | Returns: the encoded password |
Encodes the username/realm/password triplet for Digest
authentication. (That is, it returns a stringified MD5 hash of
username
, realm
, and password
concatenated together). This is
the form that is needed as the return value of
AuthDomainDigest
's auth handler.
For security reasons, you should store the encoded hash, rather than storing the cleartext password itself and calling this method only when you need to verify it. This way, if your server is compromised, the attackers will not gain access to cleartext passwords which might also be usable at other sites. (Note also that the encoded password returned by this method is identical to the encoded password stored in an Apache .htdigest file.)
setAuthCallback
authDomainDigestSetAuthCallback Source #
:: (HasCallStack, MonadIO m, IsAuthDomainDigest a) | |
=> a |
|
-> AuthDomainDigestAuthCallback |
|
-> m () |
Sets the callback that domain
will use to authenticate incoming
requests. For each request containing authorization, domain
will
invoke the callback, and then either accept or reject the request
based on callback
's return value.
You can also set the auth callback by setting the
AUTH_DOMAIN_DIGEST_AUTH_CALLBACK
and
AUTH_DOMAIN_DIGEST_AUTH_DATA
properties, which can also be
used to set the callback at construct time.
Properties
authCallback
clearAuthDomainDigestAuthCallback :: (MonadIO m, IsAuthDomainDigest o) => o -> m () Source #
Set the value of the “auth-callback
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#authCallback
constructAuthDomainDigestAuthCallback :: (IsAuthDomainDigest o, MonadIO m) => FunPtr C_AuthDomainDigestAuthCallback -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “auth-callback
” property. This is rarely needed directly, but it is used by new
.
getAuthDomainDigestAuthCallback :: (MonadIO m, IsAuthDomainDigest o) => o -> m (Maybe AuthDomainDigestAuthCallback_WithClosures) Source #
Get the value of the “auth-callback
” property.
When overloading is enabled, this is equivalent to
get
authDomainDigest #authCallback
setAuthDomainDigestAuthCallback :: (MonadIO m, IsAuthDomainDigest o) => o -> FunPtr C_AuthDomainDigestAuthCallback -> m () Source #
Set the value of the “auth-callback
” property.
When overloading is enabled, this is equivalent to
set
authDomainDigest [ #authCallback:=
value ]
authData
The data to pass to the AuthDomainDigestAuthCallback
constructAuthDomainDigestAuthData :: (IsAuthDomainDigest o, MonadIO m) => Ptr () -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “auth-data
” property. This is rarely needed directly, but it is used by new
.
getAuthDomainDigestAuthData :: (MonadIO m, IsAuthDomainDigest o) => o -> m (Ptr ()) Source #
Get the value of the “auth-data
” property.
When overloading is enabled, this is equivalent to
get
authDomainDigest #authData
setAuthDomainDigestAuthData :: (MonadIO m, IsAuthDomainDigest o) => o -> Ptr () -> m () Source #
Set the value of the “auth-data
” property.
When overloading is enabled, this is equivalent to
set
authDomainDigest [ #authData:=
value ]