This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule Destructure do | |
| @moduledoc """ | |
| Provides helpers for destructuring Elixir data structures. See the `d/1` macro | |
| for more information. | |
| """ | |
| @doc """ | |
| Easy destructuring of maps and keyword lists, with atom keys only. | |
| ## Examples |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule MyApp.Auth do | |
| @moduledoc """ | |
| Creates `Ueberauth.Auth` structs from OAuth responses. | |
| This module is an ugly hack which is necessary because `Ueberauth` doesn't provide | |
| the necessary hooks to get such a struct without giving it control of the whole | |
| callback phase. We can't do this in the API because all the mobile app can give us | |
| is the OAuth token. | |
| Most of the code was lifted from Ueberauth, with minor changes as needed. |
OlderNewer