rodauth-oauth 0.10.4 → 1.0.0.pre.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIGRATION-GUIDE-v1.md +286 -0
- data/README.md +22 -30
- data/doc/release_notes/1_0_0_beta1.md +38 -0
- data/lib/generators/rodauth/oauth/install_generator.rb +0 -1
- data/lib/generators/rodauth/oauth/templates/app/views/rodauth/authorize.html.erb +4 -6
- data/lib/generators/rodauth/oauth/templates/app/views/rodauth/device_search.html.erb +1 -1
- data/lib/generators/rodauth/oauth/templates/app/views/rodauth/device_verification.html.erb +2 -2
- data/lib/generators/rodauth/oauth/templates/app/views/rodauth/new_oauth_application.html.erb +1 -6
- data/lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_application.html.erb +0 -2
- data/lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_application_oauth_grants.html.erb +41 -0
- data/lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_applications.html.erb +2 -2
- data/lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_grants.html.erb +37 -0
- data/lib/generators/rodauth/oauth/templates/db/migrate/create_rodauth_oauth.rb +18 -29
- data/lib/rodauth/features/oauth_application_management.rb +59 -72
- data/lib/rodauth/features/oauth_assertion_base.rb +19 -23
- data/lib/rodauth/features/oauth_authorization_code_grant.rb +35 -88
- data/lib/rodauth/features/oauth_authorize_base.rb +103 -20
- data/lib/rodauth/features/oauth_base.rb +365 -302
- data/lib/rodauth/features/oauth_client_credentials_grant.rb +20 -18
- data/lib/rodauth/features/{oauth_device_grant.rb → oauth_device_code_grant.rb} +62 -73
- data/lib/rodauth/features/oauth_dynamic_client_registration.rb +46 -28
- data/lib/rodauth/features/oauth_grant_management.rb +70 -0
- data/lib/rodauth/features/oauth_implicit_grant.rb +25 -24
- data/lib/rodauth/features/oauth_jwt.rb +52 -688
- data/lib/rodauth/features/oauth_jwt_base.rb +435 -0
- data/lib/rodauth/features/oauth_jwt_bearer_grant.rb +45 -17
- data/lib/rodauth/features/oauth_jwt_jwks.rb +47 -0
- data/lib/rodauth/features/oauth_jwt_secured_authorization_request.rb +62 -0
- data/lib/rodauth/features/oauth_management_base.rb +2 -0
- data/lib/rodauth/features/oauth_pkce.rb +22 -26
- data/lib/rodauth/features/oauth_resource_indicators.rb +33 -21
- data/lib/rodauth/features/oauth_resource_server.rb +59 -0
- data/lib/rodauth/features/oauth_saml_bearer_grant.rb +5 -1
- data/lib/rodauth/features/oauth_token_introspection.rb +76 -46
- data/lib/rodauth/features/oauth_token_revocation.rb +46 -33
- data/lib/rodauth/features/oidc.rb +188 -95
- data/lib/rodauth/features/oidc_dynamic_client_registration.rb +89 -53
- data/lib/rodauth/oauth/database_extensions.rb +8 -6
- data/lib/rodauth/oauth/http_extensions.rb +61 -0
- data/lib/rodauth/oauth/railtie.rb +20 -0
- data/lib/rodauth/oauth/version.rb +1 -1
- data/lib/rodauth/oauth.rb +29 -1
- data/locales/en.yml +32 -22
- data/locales/pt.yml +32 -22
- data/templates/authorize.str +19 -24
- data/templates/device_search.str +1 -1
- data/templates/device_verification.str +2 -2
- data/templates/jwks_field.str +1 -0
- data/templates/new_oauth_application.str +1 -2
- data/templates/oauth_application.str +2 -2
- data/templates/oauth_application_oauth_grants.str +54 -0
- data/templates/oauth_applications.str +2 -2
- data/templates/oauth_grants.str +52 -0
- metadata +20 -16
- data/lib/generators/rodauth/oauth/templates/app/models/oauth_token.rb +0 -4
- data/lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_application_oauth_tokens.html.erb +0 -39
- data/lib/generators/rodauth/oauth/templates/app/views/rodauth/oauth_tokens.html.erb +0 -35
- data/lib/rodauth/features/oauth.rb +0 -9
- data/lib/rodauth/features/oauth_http_mac.rb +0 -86
- data/lib/rodauth/features/oauth_token_management.rb +0 -81
- data/lib/rodauth/oauth/refinements.rb +0 -48
- data/templates/jwt_public_key_field.str +0 -4
- data/templates/oauth_application_oauth_tokens.str +0 -52
- data/templates/oauth_tokens.str +0 -50
data/templates/oauth_tokens.str
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
<div id="oauth-tokens">
|
2
|
-
#{
|
3
|
-
if @oauth_tokens.count.zero?
|
4
|
-
"<p>No oauth tokens yet!</p>"
|
5
|
-
else
|
6
|
-
<<-HTML
|
7
|
-
<table class="table">
|
8
|
-
<thead>
|
9
|
-
<tr>
|
10
|
-
<th scope="col">#{rodauth.oauth_applications_name_label}</th>
|
11
|
-
<th scope="col">#{rodauth.oauth_tokens_token_label}</th>
|
12
|
-
<th scope="col">#{rodauth.oauth_tokens_refresh_token_label}</th>
|
13
|
-
<th scope="col">#{rodauth.oauth_tokens_expires_in_label}</th>
|
14
|
-
<th scope="col">#{rodauth.oauth_tokens_scopes_label}</th>
|
15
|
-
<th scope="col"><span class="badge badge-pill badge-dark">#{@oauth_tokens.count}</span>
|
16
|
-
</tr>
|
17
|
-
</thead>
|
18
|
-
<tbody>
|
19
|
-
#{
|
20
|
-
@oauth_tokens.map do |oauth_token|
|
21
|
-
<<-HTML
|
22
|
-
<tr>
|
23
|
-
<td>#{oauth_token[rodauth.oauth_applications_name_column]}</td>
|
24
|
-
<td><code class="token">#{oauth_token[rodauth.oauth_tokens_token_column]}</code></td>
|
25
|
-
<td><code class="token">#{oauth_token[rodauth.oauth_tokens_refresh_token_column]}</code></td>
|
26
|
-
<td>#{oauth_token[rodauth.oauth_tokens_expires_in_column]}</td>
|
27
|
-
<td>#{oauth_token[rodauth.oauth_tokens_scopes_column]}</td>
|
28
|
-
<td>
|
29
|
-
#{
|
30
|
-
if !oauth_token[rodauth.oauth_tokens_token_hash_column]
|
31
|
-
<<-HTML
|
32
|
-
<form method="post" action="#{rodauth.oauth_token_path(oauth_token[rodauth.oauth_tokens_id_column])}" class="form-horizontal" role="form" id="token-revoke-form">
|
33
|
-
#{csrf_tag(rodauth.oauth_token_path(oauth_token[rodauth.oauth_tokens_id_column])) if respond_to?(:csrf_tag)}
|
34
|
-
#{rodauth.button(rodauth.oauth_token_revoke_button)}
|
35
|
-
</form>
|
36
|
-
HTML
|
37
|
-
end
|
38
|
-
}
|
39
|
-
</td>
|
40
|
-
</tr>
|
41
|
-
HTML
|
42
|
-
end.join
|
43
|
-
}
|
44
|
-
</tbody>
|
45
|
-
</table>
|
46
|
-
#{rodauth.oauth_management_pagination_links(@oauth_tokens)}
|
47
|
-
HTML
|
48
|
-
end
|
49
|
-
}
|
50
|
-
</div>
|