discourse/spec/serializers
Penar Musaraj e3e73a3091
DEV: Add routes and controller actions for passkeys (2/3) (#23587)
This is part 2 (of 3) for passkeys support.

This adds a hidden site setting plus routes and controller actions.

1. registering passkeys

Passkeys are registered in a two-step process. First, `create_passkey`
returns details for the browser to create a passkey. This includes
- a challenge
- the relying party ID and Origin
- the user's secure identifier
- the supported algorithms
- the user's existing passkeys (if any)

Then the browser creates a key with this information, and submits it to
the server via `register_passkey`.

2. authenticating passkeys

A similar process happens here as well. First, a challenge is created
and sent to the browser. Then the browser makes a public key credential
and submits it to the server via `passkey_auth_perform`.

3. renaming/deleting passkeys

These routes allow changing the name of a key and deleting it.

4. checking if session is trusted for sensitive actions

Since a passkey is a password replacement, we want to make sure to confirm the user's identity before allowing adding/deleting passkeys. The u/trusted-session GET route returns success if user has confirmed their session (and failed if user hasn't). In the frontend (in the next PR), we're using these routes to show the password confirmation screen. 

The `/u/confirm-session` route allows the user to confirm their session with a password. The latter route's functionality already existed in core, under the 2FA flow, but it has been abstracted into its own here so it can be used independently.


Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2023-10-11 14:36:54 -04:00
..
about_serializer_spec.rb DEV: Use proper wording for contexts in specs 2022-08-04 11:05:02 +02:00
admin_plugin_serializer_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
admin_user_action_serializer_spec.rb FIX: Show topic titles in deleted-posts (#19610) 2022-12-28 16:07:06 +08:00
admin_user_list_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
basic_group_serializer_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
basic_group_user_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
basic_post_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
basic_reviewable_flagged_post_serializer_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
basic_reviewable_queued_post_serializer_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
basic_reviewable_serializer_spec.rb DEV: Add reviewables tab to the new user menu (#17630) 2022-07-28 11:16:33 +03:00
basic_reviewable_user_serializer_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
basic_user_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
basic_user_with_status_serializer_spec.rb DEV: move BasicUserWithStatusSerializer from Discourse Chat (#18745) 2022-10-26 16:41:31 +04:00
category_detailed_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
category_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
category_upload_serializer_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
current_user_serializer_spec.rb FEATURE: Remove support for legacy navigation menu (#23752) 2023-10-09 07:24:10 +08:00
detailed_user_badge_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
directory_item_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
emoji_serializer_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
found_user_serializer_spec.rb DEV: return user IDs on the user search route (#21206) 2023-04-25 18:25:57 +04:00
found_user_with_status_serializer_spec.rb DEV: return user status on the user search route (#17716) 2022-08-09 14:54:33 +04:00
group_show_serializer_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
group_user_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
invite_serializer_spec.rb FIX: Hide delete button to invite as user are unable to delete anyway (#21884) 2023-06-06 12:24:19 +08:00
listable_topic_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
new_post_result_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
notification_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
pending_post_serializer_spec.rb FIX: Attribute pending post to author in PendingPostSerialier (#23369) 2023-09-03 22:14:51 +00:00
post_revision_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
post_serializer_spec.rb FEATURE: Implement SiteSetting to Allow Anonymous Likes (#22131) 2023-07-21 21:21:07 +08:00
poster_serializer_spec.rb FIX: Include group flair in homepage category topic lists (#21268) 2023-04-27 10:18:16 +08:00
reviewable_flagged_post_serializer_spec.rb DEV: Include context question for chat reviewables (#23332) 2023-09-05 10:11:39 +08:00
reviewable_queued_post_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
reviewable_score_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
reviewable_serializer_spec.rb DEV: Include context question for chat reviewables (#23332) 2023-09-05 10:11:39 +08:00
reviewable_user_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
single_sign_on_record_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
site_serializer_spec.rb FEATURE: Remove support for legacy navigation menu (#23752) 2023-10-09 07:24:10 +08:00
suggested_topic_serializer_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
tag_group_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
tag_serializer_spec.rb DEV: Fix random typos (#23801) 2023-10-05 20:40:53 +02:00
theme_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
topic_link_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
topic_list_item_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
topic_list_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
topic_tracking_state_item_serializer_spec.rb FEATURE: Remove support for legacy navigation menu (#23752) 2023-10-09 07:24:10 +08:00
topic_tracking_state_serializer_spec.rb DEV: Improve MessageBus subscriptions for TopicTrackingState (#19767) 2023-02-01 07:18:45 +08:00
topic_view_details_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
topic_view_posts_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
topic_view_serializer_spec.rb FIX: Missing pending queued posts from topic view (#22838) 2023-07-28 16:16:23 +00:00
upload_serializer_spec.rb DEV: Update the rubocop-discourse gem 2023-06-26 11:41:52 +02:00
user_auth_token_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
user_badge_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
user_bookmark_list_serializer_spec.rb SECURITY: Impose a upper bound on limit params in various controllers 2023-07-28 12:53:46 +01:00
user_card_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
user_post_bookmark_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
user_serializer_spec.rb DEV: Add routes and controller actions for passkeys (2/3) (#23587) 2023-10-11 14:36:54 -04:00
user_status_serializer_spec.rb DEV: Format UserStatus#ends_at as a ISO8601 timestamp (#23796) 2023-10-05 20:41:12 +02:00
user_summary_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
web_hook_post_serializer_spec.rb FIX: Show auto-group flair according to user preferences (#21221) 2023-04-24 16:04:26 -03:00
web_hook_topic_view_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00
web_hook_user_serializer_spec.rb FEATURE: Remove support for legacy navigation menu (#23752) 2023-10-09 07:24:10 +08:00
wizard_serializer_spec.rb DEV: Apply syntax_tree formatting to spec/* 2023-01-09 11:49:28 +00:00