Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

Commit0213d12

Browse files
committed
Add example usage
1 parentc7e88e2 commit0213d12

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎plugin.rb‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,16 @@ def response(env)
7878
# We'll store the value in the user associated account's extra attribute hash using the full path as the key.
7979
DiscoursePluginRegistry.define_filtered_register:oauth2_basic_additional_json_paths
8080

81-
# After authentication, we'll use this to confirm that the registered json paths are fulfilled,
82-
# or display an error message to the user.
81+
# After authentication, we'll use this to confirm that the registered json paths are fulfilled, or display an error.
8382
# This requires SiteSetting.oauth2_fetch_user_details? to be true, and can be used with
8483
# DiscoursePluginRegistry.oauth2_basic_additional_json_paths.
84+
#
85+
# Example usage:
86+
# DiscoursePluginRegistry.register_oauth2_basic_required_json_path({
87+
# path: "extra:data.is_allowed_user",
88+
# required_value: true,
89+
# error_message: I18n.t("auth.user_not_allowed")
90+
# }, self)
8591
DiscoursePluginRegistry.define_filtered_register:oauth2_basic_required_json_paths
8692

8793
class ::OAuth2BasicAuthenticator <Auth::ManagedAuthenticator

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp