rodauth-oauth 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -1
- data/README.md +1 -1
- data/lib/rodauth/features/oauth.rb +2 -0
- data/lib/rodauth/oauth/version.rb +1 -1
- data/lib/rodauth/oauth.rb +0 -2
- data/templates/authorize.str +1 -1
- data/templates/oauth_application.str +2 -2
- data/templates/oauth_tokens.str +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e6a9da692805069b0250b975d86c02f81af6bd1cc80ce24ecbc92ea6d3fef14
|
4
|
+
data.tar.gz: c4996d52e4119f6a2d8fde3f0149f8deadb609324fb894c99d5fbcdf836efd4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8ec7872e8997019182b04a40c11f5db1e272de0bcceada11f870d706f2646aca911239d1f01876f26126e0936938a6ea233f312304410ce0c35d3964ebe7f1f
|
7
|
+
data.tar.gz: 4a5df07c4da7c30803d7cb513c87ca6296b205dcdae89eb3ab475aa6780a4b37acd0e3b3bae5d43372eb8f9d3a92bd30a761ad7cda269d18d7bc16658f719768
|
data/CHANGELOG.md
CHANGED
@@ -2,11 +2,22 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
### 0.7.1 (05/12/2021)
|
6
|
+
|
7
|
+
#### Improvements
|
8
|
+
|
9
|
+
* Adapted the `rodauth-i18n` configuration to comply with the guidelines for `v0.2.0` (which is the defacto minimmal supported version).
|
10
|
+
|
11
|
+
#### Bugfixes
|
12
|
+
|
13
|
+
* `convert_timestamp` was removed from the templates, as it's private API.
|
14
|
+
* Several missing or wrong URLs in templates fixed (authorize form was wrongly processing scopes when none was selected).
|
15
|
+
|
5
16
|
### 0.7.0 (02/12/2021)
|
6
17
|
|
7
18
|
#### Features
|
8
19
|
|
9
|
-
* Internationalization (i18n) support by hooking on [rodauth-
|
20
|
+
* Internationalization (i18n) support by hooking on [rodauth-i18n](https://github.com/janko/rodauth-i18n).
|
10
21
|
* Sets all text using `translatable_method`.
|
11
22
|
* Provides english translations for all `rodauth-oauth` related user facing text.
|
12
23
|
|
data/README.md
CHANGED
@@ -173,7 +173,7 @@ puts payload #=> {"access_token" => "awr23f3h8f9d2h89...", "token_type" => "Bear
|
|
173
173
|
|
174
174
|
#### Revoking tokens
|
175
175
|
|
176
|
-
Token revocation can be done both by the
|
176
|
+
Token revocation can be done both by the identity owner or the application owner, and can therefore be done either online (browser-based form) or server-to-server. Here's an example using server-to-server:
|
177
177
|
|
178
178
|
```ruby
|
179
179
|
require "httpx"
|
@@ -570,6 +570,8 @@ module Rodauth
|
|
570
570
|
end
|
571
571
|
|
572
572
|
self.class.send(:define_method, :__one_oauth_token_per_account) { one_oauth_token_per_account }
|
573
|
+
|
574
|
+
i18n_register(File.expand_path(File.join(__dir__, "..", "..", "..", "locales"))) if features.include?(:i18n)
|
573
575
|
end
|
574
576
|
|
575
577
|
def use_date_arithmetic?
|
data/lib/rodauth/oauth.rb
CHANGED
data/templates/authorize.str
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
<form method="post" class="form-horizontal" role="form" id="authorize-form">
|
1
|
+
<form method="post" action="#{rodauth.authorize_path}" class="form-horizontal" role="form" id="authorize-form">
|
2
2
|
#{csrf_tag(rodauth.authorize_path) if respond_to?(:csrf_tag)}
|
3
3
|
<p class="lead">The application #{rodauth.oauth_application[rodauth.oauth_applications_name_column]} would like to access your data.</p>
|
4
4
|
|
@@ -7,5 +7,5 @@
|
|
7
7
|
end.join
|
8
8
|
}
|
9
9
|
</dl>
|
10
|
-
<a href="
|
11
|
-
</div>
|
10
|
+
<a href="#{rodauth.oauth_applications_path}/#{@oauth_application[:id]}/#{rodauth.oauth_tokens_path}" class="btn btn-outline-secondary">Oauth Tokens</a>
|
11
|
+
</div>
|
data/templates/oauth_tokens.str
CHANGED
@@ -21,14 +21,14 @@
|
|
21
21
|
<tr>
|
22
22
|
<td>#{oauth_token[rodauth.oauth_tokens_token_column]}</td>
|
23
23
|
<td>#{oauth_token[rodauth.oauth_tokens_refresh_token_column]}</td>
|
24
|
-
<td>#{
|
25
|
-
<td>#{
|
24
|
+
<td>#{oauth_token[rodauth.oauth_tokens_expires_in_column]}</td>
|
25
|
+
<td>#{oauth_token[rodauth.oauth_tokens_revoked_at_column]}</td>
|
26
26
|
<td>
|
27
27
|
#{
|
28
28
|
if !oauth_token[rodauth.oauth_tokens_revoked_at_param] && !oauth_token[rodauth.oauth_tokens_token_hash_column]
|
29
29
|
<<-HTML
|
30
30
|
<form method="post" action="#{rodauth.revoke_path}" class="form-horizontal" role="form" id="revoke-form">
|
31
|
-
#{csrf_tag(rodauth.
|
31
|
+
#{csrf_tag(rodauth.revoke_path) if respond_to?(:csrf_tag)}
|
32
32
|
#{rodauth.input_field_string("token_type_hint", "revoke-token-type-hint", :value => "access_token", :type=>"hidden")}
|
33
33
|
#{rodauth.input_field_string("token", "revoke-token", :value => oauth_token[rodauth.oauth_tokens_token_column], :type=>"hidden")}
|
34
34
|
#{rodauth.button(rodauth.oauth_token_revoke_button)}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rodauth-oauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tiago Cardoso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-12-
|
11
|
+
date: 2021-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Implementation of the OAuth 2.0 protocol on top of rodauth.
|
14
14
|
email:
|
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
|
-
rubygems_version: 3.
|
75
|
+
rubygems_version: 3.1.6
|
76
76
|
signing_key:
|
77
77
|
specification_version: 4
|
78
78
|
summary: Implementation of the OAuth 2.0 protocol on top of rodauth.
|