Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Secret.Functions
Contents
Description
Synopsis
- attributesValidate :: (HasCallStack, MonadIO m) => Schema -> Map (Ptr ()) (Ptr ()) -> m ()
- getSchema :: (HasCallStack, MonadIO m) => SchemaType -> m Schema
- passwordClear :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe Schema -> Map Text Text -> Maybe a -> Maybe AsyncReadyCallback -> m ()
- passwordClearFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m ()
- passwordClearSync :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe Schema -> Map Text Text -> Maybe a -> m ()
- passwordLookup :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe Schema -> Map Text Text -> Maybe a -> Maybe AsyncReadyCallback -> m ()
- passwordLookupFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m Text
- passwordLookupSync :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe Schema -> Map Text Text -> Maybe a -> m (Maybe Text)
- passwordSearch :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe Schema -> Map Text Text -> [SearchFlags] -> Maybe a -> Maybe AsyncReadyCallback -> m ()
- passwordSearchFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m [Retrievable]
- passwordSearchSync :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe Schema -> Map Text Text -> [SearchFlags] -> Maybe a -> m [Retrievable]
- passwordStore :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe Schema -> Map Text Text -> Maybe Text -> Text -> Text -> Maybe a -> Maybe AsyncReadyCallback -> m ()
- passwordStoreBinary :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe Schema -> Map Text Text -> Maybe Text -> Text -> Value -> Maybe a -> Maybe AsyncReadyCallback -> m ()
- passwordStoreBinarySync :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe Schema -> Map Text Text -> Maybe Text -> Text -> Value -> Maybe a -> m ()
- passwordStoreFinish :: (HasCallStack, MonadIO m, IsAsyncResult a) => a -> m ()
- passwordStoreSync :: (HasCallStack, MonadIO m, IsCancellable a) => Maybe Schema -> Map Text Text -> Maybe Text -> Text -> Text -> Maybe a -> m ()
- passwordWipe :: (HasCallStack, MonadIO m) => Maybe Text -> m ()
Methods
attributesValidate
Arguments
:: (HasCallStack, MonadIO m) | |
=> Schema |
|
-> Map (Ptr ()) (Ptr ()) |
|
-> m () | (Can throw |
Check if attributes are valid according to the provided schema.
Verifies schema name if available, attribute names and parsing of attribute values.
getSchema
Arguments
:: (HasCallStack, MonadIO m) | |
=> SchemaType |
|
-> m Schema | Returns: schema type |
Get a secret storage schema of the given type
.
C code may access the schemas (such as SECRET_SCHEMA_NOTE
) directly, but
language bindings cannot, and must use this accessor.
Since: 0.18.6
passwordClear
Arguments
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe a |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Remove unlocked matching passwords from the secret service.
The attributes
should be a set of key and value string pairs.
All unlocked items that match the attributes will be deleted.
This method will return immediately and complete asynchronously.
passwordClearFinish
Arguments
:: (HasCallStack, MonadIO m, IsAsyncResult a) | |
=> a |
|
-> m () | (Can throw |
Finish an asynchronous operation to remove passwords from the secret service.
passwordClearSync
Arguments
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe a |
|
-> m () | (Can throw |
Remove unlocked matching passwords from the secret service.
The attributes
should be a set of key and value string pairs.
All unlocked items that match the attributes will be deleted.
This method may block indefinitely and should not be used in user interface threads.
passwordLookup
Arguments
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe a |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Lookup a password in the secret service.
The attributes
should be a set of key and value string pairs.
If no secret is found then Nothing
is returned.
This method will return immediately and complete asynchronously.
passwordLookupFinish
Arguments
:: (HasCallStack, MonadIO m, IsAsyncResult a) | |
=> a |
|
-> m Text | Returns: a new password string which should be freed with
[func |
Finish an asynchronous operation to lookup a password in the secret service.
passwordLookupSync
Arguments
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe a |
|
-> m (Maybe Text) | Returns: a new password string which should be freed with
[func |
Lookup a password in the secret service.
The attributes
should be a set of key and value string pairs.
If no secret is found then Nothing
is returned.
This method may block indefinitely and should not be used in user interface threads.
passwordSearch
Arguments
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Maybe Schema |
|
-> Map Text Text |
|
-> [SearchFlags] |
|
-> Maybe a |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Search for items in the secret service.
The attributes
should be a set of key and value string pairs.
This method will return immediately and complete asynchronously.
Since: 0.19.0
passwordSearchFinish
Arguments
:: (HasCallStack, MonadIO m, IsAsyncResult a) | |
=> a |
|
-> m [Retrievable] | Returns: a list of
[iface |
Finish an asynchronous operation to search for items in the secret service.
Since: 0.19.0
passwordSearchSync
Arguments
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Maybe Schema |
|
-> Map Text Text |
|
-> [SearchFlags] |
|
-> Maybe a |
|
-> m [Retrievable] | Returns: a list of
[iface |
Search for items in the secret service.
The attributes
should be a set of key and value string pairs.
If no secret is found then Nothing
is returned.
This method may block indefinitely and should not be used in user interface threads.
Since: 0.19.0
passwordStore
Arguments
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe Text |
|
-> Text |
|
-> Text |
|
-> Maybe a |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Store a password in the secret service.
The attributes
should be a set of key and value string pairs.
If the attributes match a secret item already stored in the collection, then the item will be updated with these new values.
If collection
is Nothing
, then the default collection will be
used. Use [constcOLLECTIONSESSION
] to store the password in the session
collection, which doesn't get stored across login sessions.
This method will return immediately and complete asynchronously.
passwordStoreBinary
Arguments
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe Text |
|
-> Text |
|
-> Value |
|
-> Maybe a |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Store a password in the secret service.
This is similar to [funcpasswordStorev
], but takes a
[structvalue
] as the argument instead of a null-terminated password.
This method will return immediately and complete asynchronously.
Since: 0.19.0
passwordStoreBinarySync
passwordStoreBinarySync Source #
Arguments
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe Text |
|
-> Text |
|
-> Value |
|
-> Maybe a |
|
-> m () | (Can throw |
Store a password in the secret service.
This is similar to [funcpasswordStorevSync
], but takes a [structvalue
] as
the argument instead of a null-terminated passwords.
This method may block indefinitely and should not be used in user interface threads.
Since: 0.19.0
passwordStoreFinish
Arguments
:: (HasCallStack, MonadIO m, IsAsyncResult a) | |
=> a |
|
-> m () | (Can throw |
Finish asynchronous operation to store a password in the secret service.
passwordStoreSync
Arguments
:: (HasCallStack, MonadIO m, IsCancellable a) | |
=> Maybe Schema |
|
-> Map Text Text |
|
-> Maybe Text |
|
-> Text |
|
-> Text |
|
-> Maybe a |
|
-> m () | (Can throw |
Store a password in the secret service.
The attributes
should be a set of key and value string pairs.
If the attributes match a secret item already stored in the collection, then the item will be updated with these new values.
If collection
is Nothing
, then the default collection will be
used. Use [constcOLLECTIONSESSION
] to store the password in the session
collection, which doesn't get stored across login sessions.
This method may block indefinitely and should not be used in user interface threads.
passwordWipe
Arguments
:: (HasCallStack, MonadIO m) | |
=> Maybe Text |
|
-> m () |
Clear the memory used by a password.