authorio 0.8.0 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +52 -4
  3. data/app/assets/stylesheets/authorio/auth.css +55 -1
  4. data/app/controllers/authorio/auth_controller.rb +76 -91
  5. data/app/controllers/authorio/authorio_controller.rb +78 -0
  6. data/app/controllers/authorio/sessions_controller.rb +33 -0
  7. data/app/controllers/authorio/users_controller.rb +34 -0
  8. data/app/helpers/authorio/tag_helper.rb +17 -0
  9. data/app/jobs/authorio/application_job.rb +2 -0
  10. data/app/models/authorio/application_record.rb +2 -0
  11. data/app/models/authorio/request.rb +39 -1
  12. data/app/models/authorio/session.rb +43 -0
  13. data/app/models/authorio/token.rb +23 -1
  14. data/app/models/authorio/user.rb +14 -0
  15. data/app/views/authorio/auth/authorization_interface.html.erb +14 -35
  16. data/app/views/authorio/auth/issue_token.json.jbuilder +7 -0
  17. data/app/views/authorio/auth/send_profile.json.jbuilder +3 -0
  18. data/app/views/authorio/auth/verify_token.json.jbuilder +5 -0
  19. data/app/views/authorio/sessions/new.html.erb +14 -0
  20. data/app/views/authorio/users/_profile.json.jbuilder +10 -0
  21. data/app/views/authorio/users/edit.html.erb +25 -0
  22. data/app/views/authorio/users/show.html.erb +18 -0
  23. data/app/views/authorio/users/verify.html.erb +1 -0
  24. data/app/views/layouts/authorio/main.html.erb +38 -0
  25. data/app/views/shared/_login_form.html.erb +41 -0
  26. data/config/routes.rb +15 -5
  27. data/db/migrate/20210723161041_add_expiry_to_tokens.rb +5 -0
  28. data/db/migrate/20210726164625_create_authorio_sessions.rb +12 -0
  29. data/db/migrate/20210801184120_add_profile_to_users.rb +8 -0
  30. data/db/migrate/20210817010101_change_path_to_username_in_users.rb +7 -0
  31. data/lib/authorio/configuration.rb +14 -9
  32. data/lib/authorio/engine.rb +11 -8
  33. data/lib/authorio/exceptions.rb +20 -3
  34. data/lib/authorio/routes.rb +10 -7
  35. data/lib/authorio/version.rb +3 -1
  36. data/lib/authorio.rb +15 -21
  37. data/lib/generators/authorio/install/install_generator.rb +3 -3
  38. data/lib/generators/authorio/install/templates/authorio.rb +22 -8
  39. data/lib/tasks/authorio_tasks.rake +15 -14
  40. metadata +58 -30
  41. data/app/controllers/authorio/application_controller.rb +0 -4
  42. data/app/controllers/authorio/helpers.rb +0 -17
  43. data/app/helpers/authorio/application_helper.rb +0 -4
  44. data/app/helpers/authorio/test_helper.rb +0 -4
  45. data/app/views/layouts/authorio/application.html.erb +0 -15
@@ -1,4 +0,0 @@
1
- module Authorio
2
- class ApplicationController < ActionController::Base
3
- end
4
- end
@@ -1,17 +0,0 @@
1
- module Authorio
2
- # These helpers are provided to the main application
3
- module Helpers
4
- extend ActiveSupport::Concern
5
-
6
- included do
7
- if respond_to?(:helper_method)
8
- helper_method :indieauth_tag
9
- end
10
- end
11
-
12
- def indieauth_tag
13
- %Q[<link rel="authorization_endpoint" href="#{URI.join(root_url, Authorio.authorization_path)}">
14
- <link rel="token_endpoint" href="#{URI.join(root_url, Authorio.token_path)}">].html_safe
15
- end
16
- end
17
- end
@@ -1,4 +0,0 @@
1
- module Authorio
2
- module ApplicationHelper
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module Authorio
2
- module TestHelper
3
- end
4
- end
@@ -1,15 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Authorio</title>
5
- <%= csrf_meta_tags %>
6
- <%= csp_meta_tag %>
7
-
8
- <%= stylesheet_link_tag "authorio/application", media: "all" %>
9
- </head>
10
- <body>
11
-
12
- <%= yield %>
13
-
14
- </body>
15
- </html>