Class LoginExtensions
- Namespace
- Akavache
- Assembly
- Akavache.dll
Provides extension methods for handling user login credentials in secure blob caches.
public static class LoginExtensions
- Inheritance
-
LoginExtensions
Methods
EraseLogin(ISecureBlobCache, string)
Erases the login associated with the specified host.
public static IObservable<Unit> EraseLogin(this ISecureBlobCache blobCache, string host = "default")
Parameters
blobCacheISecureBlobCacheThe blob cache where to erase the data.
hoststringThe host associated with the data.
Returns
- IObservable<Unit>
A observable which signals when the erase is completed.
GetLogin(ISecureBlobCache, string)
Retrieves the currently cached username and password for the specified host. If the cache does not contain login data for the host, this method returns an observable that signals an error with KeyNotFoundException.
[RequiresUnreferencedCode("Using GetLogin requires types to be preserved for serialization")]
[RequiresDynamicCode("Using GetLogin requires types to be preserved for serialization")]
public static IObservable<LoginInfo> GetLogin(this ISecureBlobCache blobCache, string host = "default")
Parameters
blobCacheISecureBlobCacheThe secure blob cache to retrieve the login data from.
hoststringThe host identifier associated with the login data.
Returns
- IObservable<LoginInfo>
An observable that emits the cached login information.
SaveLogin(ISecureBlobCache, string, string, string, DateTimeOffset?)
Saves a username and password combination in a secure blob cache. Note that this method allows exactly one username/password combination to be saved per host. Calling this method multiple times for the same host will overwrite the previous entry.
[RequiresUnreferencedCode("Using SaveLogin requires types to be preserved for serialization")]
[RequiresDynamicCode("Using SaveLogin requires types to be preserved for serialization")]
public static IObservable<Unit> SaveLogin(this ISecureBlobCache blobCache, string user, string password, string host = "default", DateTimeOffset? absoluteExpiration = null)
Parameters
blobCacheISecureBlobCacheThe secure blob cache to store the login data.
userstringThe username to save.
passwordstringThe password associated with the username.
hoststringThe host identifier to associate with the login data.
absoluteExpirationDateTimeOffset?An optional expiration date for the cached login data.
Returns
- IObservable<Unit>
An observable that signals when the login data is saved.