oauth_im 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -6
- data/lib/oauth_im/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f30ba9108e81c20be50aac65117a6b9cded7d96dd52fe9fcec17d2ec6b9ab2af
|
4
|
+
data.tar.gz: a71b00b75aee0dce818b377e7c5d8b08d09c129ff7147aba5e823d0cbbb7d075
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84a9bfaa94c718c7c43dec3e5fdac4737e42ee6703023548ea8515dd13d0817ce1df8f25a14bb4373b16b65bd46d2de40dd019e1b13e67c7a3433c98d9c10aba
|
7
|
+
data.tar.gz: 7c3ffcaba09344862292def9e8db21ff6772b98d9233f4885e58c882196c867fad7990bce2cac8250bb1cf0eb4086d12f7a017c28a3bae4a60ba41852d7151bf
|
data/README.md
CHANGED
@@ -39,9 +39,9 @@ end
|
|
39
39
|
|
40
40
|
* The `ENV` variable values can be obtained from the OAuth provider.
|
41
41
|
* The `callback_path` setting is used in two related ways:
|
42
|
-
* It defines a route to the `OAuthIm::ClientController#callback`
|
43
|
-
action.
|
44
|
-
* It defines a callback URL used by the OAuth provider.
|
42
|
+
* It [defines a route](https://github.com/illustrativemathematics/oauth_im/blob/main/config/routes.rb#L4) to the [`OAuthIm::ClientController#callback`
|
43
|
+
action](https://github.com/illustrativemathematics/oauth_im/blob/main/app/controllers/oauth_im/client_controller.rb#L7-L12).
|
44
|
+
* It defines a [callback URL](https://github.com/illustrativemathematics/oauth_im/blob/main/app/controllers/oauth_im/client_controller.rb#L69) used by the OAuth provider.
|
45
45
|
* Note that this callback URL must be whitelisted at the provider.
|
46
46
|
At FusionAuth, this is done under the `Applications|OAuth` tab.
|
47
47
|
* For instance, for the app `staging-kh-iiab.herokuapp.com`, if
|
@@ -52,20 +52,20 @@ end
|
|
52
52
|
|
53
53
|
## Usage
|
54
54
|
### Helpers for Logging in and Out
|
55
|
-
The engine provides two
|
55
|
+
The engine provides [two endpoints](https://github.com/illustrativemathematics/oauth_im/blob/main/config/routes.rb#L5-L6) for logging in and out, and exposes
|
56
56
|
corresponding view helpers. These are accessible from the main app as:
|
57
57
|
* `oauth_im.login_path` or `oauth_im.login_url`
|
58
58
|
* `oauth_im.logout_path` or `oauth_im.logout_url`
|
59
59
|
|
60
60
|
Note that the helpers are namespaced to the engine.
|
61
61
|
|
62
|
-
The controller actions for these routes are provided and should "just
|
62
|
+
The [controller actions](https://github.com/illustrativemathematics/oauth_im/blob/main/app/controllers/oauth_im/client_controller.rb#L14-L21) for these routes are provided and should "just
|
63
63
|
work." Note that there are no view templates associated with these
|
64
64
|
actions, since requests to them are redirected to the OAuth provider.
|
65
65
|
|
66
66
|
### Helpers for User ID and Authentication
|
67
67
|
The gem provides a controller concern, `OauthIm::Authenticable`, that
|
68
|
-
exposes two helper methods for use in views:
|
68
|
+
exposes [two helper methods](https://github.com/illustrativemathematics/oauth_im/blob/main/app/controllers/concerns/oauth_im/authenticable.rb#L9-L10) for use in views:
|
69
69
|
* `authenticated?`: returns `true` if the user has been authenticated
|
70
70
|
by the OAuth service, false otherwise.
|
71
71
|
* `email`: returns the current user's authenticated email address.
|
data/lib/oauth_im/version.rb
CHANGED