warden_openid_bearer 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/warden_openid_bearer/cache_mixin.rb +2 -0
- data/lib/warden_openid_bearer/discovered_config.rb +4 -0
- data/lib/warden_openid_bearer/registerer.rb +2 -0
- data/lib/warden_openid_bearer/strategy.rb +21 -17
- data/lib/warden_openid_bearer/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: 7d1514a1fefcebd1c255a74d18df49f546d103ca7382e52464777f12c32f34e7
|
4
|
+
data.tar.gz: 91c9843e458d7bf1cedc6f360f54f40a28b67eddc9891b9fe364251c6a1c78a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d82af75ad73daffb395154b35ecefef6196078e6bfc9333d0c8d8f59a9e218100d163fcd4f0a7c6f67098bc81d47a8bc92a0a1a2f26149ddca491f02bb3bce4
|
7
|
+
data.tar.gz: 870825f9e3f800506a1c4b45ecd2783da72e8077c5a47a74abe2b4e3dc434c43ac8998cbbfe5f861aae5d964b39ebfd3aff42fd74f9aa12d070e794a17cf8f49
|
data/CHANGELOG.md
CHANGED
@@ -1,21 +1,25 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
# the back-end only checks signatures on the JWT claims).
|
6
|
-
#
|
7
|
-
# You shoud subclass `WardenOpenidBearer::Strategy` and override the
|
8
|
-
# `user_of_claims` protected method if you want `env['warden'].user`
|
9
|
-
# to be a “real” user object (instead of just a hash of OIDC claims,
|
10
|
-
# which is what happens when using `WardenOpenidBearer::Strategy` directly).
|
11
|
-
# If you want your Rails app to support more than one OIDC
|
12
|
-
# authentication server, you should also subclass
|
13
|
-
# `WardenOpenidBearer::Strategy` and override the `metadata_url` method.
|
14
|
-
#
|
15
|
-
# This class has a `self.register!` method, which makes things
|
16
|
-
# (slightly) easier than calling `Warden::Strategies.add` yourself.
|
17
|
-
# See `WardenOpenidBearer::Registerer` for details.
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "jwt"
|
4
|
+
|
18
5
|
module WardenOpenidBearer
|
6
|
+
# Like `WardenOpenidAuth::Strategy` in
|
7
|
+
# `lib/warden_openid_auth/strategy.rb` from the `warden_openid_auth`
|
8
|
+
# gem, except done right for a modern, split-backend Web application
|
9
|
+
# (in which the browser takes charge of the OAuth2 login dance, and
|
10
|
+
# the back-end only checks signatures on the JWT claims).
|
11
|
+
#
|
12
|
+
# You shoud subclass `WardenOpenidBearer::Strategy` and override the
|
13
|
+
# `user_of_claims` protected method if you want `env['warden'].user`
|
14
|
+
# to be a “real” user object (instead of just a hash of OIDC claims,
|
15
|
+
# which is what happens when using `WardenOpenidBearer::Strategy` directly).
|
16
|
+
# If you want your Rails app to support more than one OIDC
|
17
|
+
# authentication server, you should also subclass
|
18
|
+
# `WardenOpenidBearer::Strategy` and override the `metadata_url` method.
|
19
|
+
#
|
20
|
+
# This class has a `self.register!` method, which makes things
|
21
|
+
# (slightly) easier than calling `Warden::Strategies.add` yourself.
|
22
|
+
# See `WardenOpenidBearer::Registerer` for details.
|
19
23
|
class Strategy < Warden::Strategies::Base
|
20
24
|
include WardenOpenidBearer::Registerer # Provides self.register!
|
21
25
|
include WardenOpenidBearer::CacheMixin
|