Skip to content

A small helper to authenticate Flurl requests for AWS Cognito Identity

License

Notifications You must be signed in to change notification settings

ZingBallyhoo/Flurl.Unofficial.AWSCognitoIdentity

Repository files navigation

Flurl.Unofficial.AWSCognitoIdentity

NuGet

A small helper to authenticate Flurl requests for AWS Cognito Identity

How to login:

  1. Create a subclass of CognitoAuthClient.
  2. Implement the following abstract properties depending on your setup:
    • ServiceURL
    • PoolID
    • IdentityPoolID
    • ClientID
    • RegionEndpoint
  3. Create an instance of your client and call LoginAsync(string username, string password) when you are ready to login.

How to authenticate a request

  1. Import Extensions and call WithCognitoAuth(CognitoAuthClient), passing in your logged in client as the single parameter. (returns the request for chaining)
  2. Dispatch as you normally would, authentication is handled lazily in the background on an event.

Example:

"https://example.com/real_cognito_endpoint/hey".WithCognitoAuth().GetJsonAsync();

Notes:

Dependencies:

About

A small helper to authenticate Flurl requests for AWS Cognito Identity

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages