Ueberauth.Strategy.DocuSign (Ueberauth DocuSign v0.1.0)

View Source

DocuSign Strategy for Überauth.

Setup

Include the provider in your configuration for Ueberauth:

config :ueberauth, Ueberauth,
  providers: [
    docusign: {Ueberauth.Strategy.DocuSign, []}
  ]

Then configure your OAuth app at DocuSign and add the client credentials:

config :ueberauth, Ueberauth.Strategy.DocuSign.OAuth,
  client_id: System.get_env("DOCUSIGN_CLIENT_ID"),
  client_secret: System.get_env("DOCUSIGN_CLIENT_SECRET")

Options

The strategy accepts the following options:

  • oauth2_module - The OAuth2 module to use. Defaults to Ueberauth.Strategy.DocuSign.OAuth
  • default_scope - The default scope to request. Defaults to "signature"
  • default_user_email - The email address for login hint
  • environment - The DocuSign environment ("demo" or "production"). Defaults to "production"
  • state - A state parameter for CSRF protection. Auto-generated if not provided
  • prompt - Controls the authorization prompt ("login" forces re-authentication)

Summary

Functions

Includes the credentials from the DocuSign response.

Stores all the extra information from the DocuSign response.

Handles the callback from DocuSign.

Handles the initial request for DocuSign authentication.

Fetches the user information from the DocuSign response.

Fetches the uid field from the response.

Functions

credentials(conn)

Includes the credentials from the DocuSign response.

default_options()

Callback implementation for Ueberauth.Strategy.default_options/0.

extra(conn)

Stores all the extra information from the DocuSign response.

handle_callback!(conn)

Handles the callback from DocuSign.

This will either set the user information if authentication was successful, or set error information if it failed.

handle_request!(conn)

Handles the initial request for DocuSign authentication.

This will redirect the user to DocuSign's authorization page.

info(conn)

Fetches the user information from the DocuSign response.

uid(conn)

Fetches the uid field from the response.

The uid is the user's unique identifier at DocuSign.