oauth_device_code_grant.rdoc

doc/oauth_device_code_grant.rdoc
Last Update: 2024-10-27 06:27:40 +0000

Documentation for OAuth Device Grant feature

The oauth_device_code_grant feature implements the OAuth 2.0 Device Authorization Grant.

datatracker.ietf.org/doc/html/rfc8628

This feature depends on the oauth_authorize_base feature.

Auth Value Methods

oauth_device_code_grant_polling_interval

(default: 5) number of seconds client have to wait until nxt poll attempt;

oauth_device_code_grant_user_code_size

(default: 8) size of generated user codes;

oauth_grants_user_code_column

(default: :user_code) the column name where the user code is stored;

oauth_grants_last_polled_at_column

(default: :last_polled_at) the column name where the timestamp from the last polling attempt for a verified grant via /token was made;

oauth_expired_token_message

human-readable error message correspondent to the “expired_token” error code;

oauth_access_denied_message

human-readable error message correspondent to the “access_denied” error code;

oauth_authorization_pending_message

human-readable error message correspondent to the “authorization_pending” error code;

oauth_slow_down_message

human-readable error message correspondent to the “slow_down” error code;

device_authorization_route

the route for device authorization, defaults to device-authorization (device code grant).

device_route

the route for device verification, defaults to device (device code grant).

device_search_page_title

the page title from the device verification search page;

device_verification_page_title

the page title from the device verification form page;

device_verification_notice_flash

success message after verification;

device_verification_notice_flash

the flash message after the device verification form is submitted;

user_code_not_found_error_flash

the flash message when no grant is found for a user code;

oauth_grant_user_code_param

(default: “user_code”) the param which the OAuth device verification form needs to submit;

oauth_grant_user_code_label

(default: “User code”) the label for the field in the form described above;

oauth_device_search_button

(default: “Search”) the label of the submit button of the device grant device search form;

oauth_device_verification_button

(default: “Verify”) the label of the submit button of the device grant device verification form;

oauth_device_search_page_lead

Lead text of the device search form.

oauth_device_verification_page_lead

Lead text of the device verification form.

Auth Methods

before_device_authorization_route

Run arbitrary code before the device authorization route.

before_device_authorization

Run arbitrary code before issuing the device grant (through the device authorization endpoint).

before_device_route

Run arbitrary code before the device verification route.

before_device_verification

Run arbitrary code before verifying the device grant (through the device verification endpoint).

device_search_view

HTML device search form page;

device_verification_view

HTML device verification page;

generate_user_code

function which generates random user codes;