HubIdentityElixir.HubIdentity (HubIdentityElixir v0.1.1) View Source

Documentation for HubIdentityElixir.

Link to this section Summary

Functions

Authenticate with HubIdentity using an email and password. This will call the HubIdentity server and try to autheniticate. Use this method for users who authenticate directly with HubIdentity.

Get the list of Open Authentication Providers from HubIdentity. Remember these links are only good once, and one link. If a users authenticates with Google then the facebook link will be invalid. The links also expire with 10 minutes of issue.

Link to this section Functions

Authenticate with HubIdentity using an email and password. This will call the HubIdentity server and try to autheniticate. Use this method for users who authenticate directly with HubIdentity.

Examples

iex> HubIdentityElixir.authenticate(%{email: "erin@hivelocity.co.jp", password: "password"})
{:ok, %{"access_token" => access_token, "refresh_token" => refresh_token}}

iex> HubIdentityElixir.authenticate(%{email: "erin@hivelocity.co.jp", password: "wrong"})
{:error, "bad request"}

Get the list of Open Authentication Providers from HubIdentity. Remember these links are only good once, and one link. If a users authenticates with Google then the facebook link will be invalid. The links also expire with 10 minutes of issue.

Examples

iex> HubIdentityElixir.get_providers()
[
    {
        "logo_url": "https://stage-identity.hubsynch.com/images/facebook.png",
        "name": "facebook",
        "request_url": request_url
    }
]