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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91f66a3575e9f63b13eac64e44c3ce768fb5904ce5e77e0239e3f1f437c21fbf
4
- data.tar.gz: bb80d8836f4ad0b99b8e75458861c36526b9a60e623f6d799ff88a751bfe9bc0
3
+ metadata.gz: 0e6a9da692805069b0250b975d86c02f81af6bd1cc80ce24ecbc92ea6d3fef14
4
+ data.tar.gz: c4996d52e4119f6a2d8fde3f0149f8deadb609324fb894c99d5fbcdf836efd4c
5
5
  SHA512:
6
- metadata.gz: '09a5d103d91e13b011456259b255ddd930692e5f50b9ebc892fa86c8ac48006e2815f7339cb10cf1d710eefd5ae18da56a08e43aedd47002bcbaa1cf82c59c6d'
7
- data.tar.gz: 745409245789cb8e77a50724192b126e047a5258827bdec765bd2ff07ff3ff4c77bb44463bc513f384f35a3e470f67496a1f12a56777cb27c6af36e903febb7f
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-oauth](https://github.com/janko/rodauth-i18n).
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 idenntity 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:
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?
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Rodauth
4
4
  module OAuth
5
- VERSION = "0.7.0"
5
+ VERSION = "0.7.1"
6
6
  end
7
7
  end
data/lib/rodauth/oauth.rb CHANGED
@@ -5,5 +5,3 @@ require "rodauth"
5
5
  require "rodauth/oauth/version"
6
6
 
7
7
  require "rodauth/oauth/railtie" if defined?(Rails)
8
-
9
- Rodauth::I18n.directories << File.expand_path(File.join(__dir__, "..", "..", "locales")) if defined?(Rodauth::I18n)
@@ -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="/#{"#{rodauth.oauth_applications_path}/#{@oauth_application[:id]}/#{rodauth.oauth_tokens_path}"}" class="btn btn-outline-secondary">Oauth Tokens</a>
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>
@@ -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>#{rodauth.convert_timestamp(oauth_token[rodauth.oauth_tokens_expires_in_column])}</td>
25
- <td>#{rodauth.convert_timestamp(oauth_token[rodauth.oauth_tokens_revoked_at_column])}</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.oauth_revoke_path) if respond_to?(:csrf_tag)}
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.0
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-02 00:00:00.000000000 Z
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.2.22
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.