Skip to main content

Module device

Module device 

Source

Re-exportsยง

use axum::Json; ๐Ÿ”’
use axum::extract::Form; ๐Ÿ”’
use axum::extract::Request; ๐Ÿ”’
use axum::extract::State; ๐Ÿ”’
use axum::response::Html; ๐Ÿ”’
use axum::response::IntoResponse; ๐Ÿ”’
use axum::response::Redirect; ๐Ÿ”’
use axum::response::Response; ๐Ÿ”’
use http::StatusCode; ๐Ÿ”’
use http::header::CACHE_CONTROL; ๐Ÿ”’
use http::header::PRAGMA; ๐Ÿ”’
use http::header::REFERRER_POLICY; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde_json::json; ๐Ÿ”’
use tuwunel_core::Err; ๐Ÿ”’
use tuwunel_core::Error; ๐Ÿ”’
use tuwunel_core::Result; ๐Ÿ”’
use tuwunel_core::err; ๐Ÿ”’
use tuwunel_service::Services; ๐Ÿ”’
use tuwunel_service::oauth::server::DEVICE_GRANT_INTERVAL_SECS; ๐Ÿ”’
use tuwunel_service::oauth::server::DEVICE_GRANT_LIFETIME; ๐Ÿ”’
use tuwunel_service::oauth::server::format_user_code; ๐Ÿ”’
use tuwunel_service::users::LoginProviderId; ๐Ÿ”’
use url::Url; ๐Ÿ”’
use self::consent::consent_html; ๐Ÿ”’
use self::entry::entry_html; ๐Ÿ”’
use self::error::error_html; ๐Ÿ”’
use self::result::result_html; ๐Ÿ”’
use super::consume_login_token_with_provider; ๐Ÿ”’
use super::oauth_error; ๐Ÿ”’
use super::peek_login_token_with_provider; ๐Ÿ”’
use super::require_account_usable; ๐Ÿ”’
use super::sso_redirect_url; ๐Ÿ”’
use super::url_encode; ๐Ÿ”’
use crate::ClientIp; ๐Ÿ”’

Modulesยง

consent ๐Ÿ”’
entry ๐Ÿ”’
error ๐Ÿ”’
result ๐Ÿ”’

Structsยง

DeviceAuthRequest ๐Ÿ”’
DeviceCallbackParams ๐Ÿ”’
DeviceVerifyParams ๐Ÿ”’

Staticsยง

DEVICE_HEAD ๐Ÿ”’

Functionsยง

device_authorization ๐Ÿ”’
device_authorization_error ๐Ÿ”’
device_authorization_route ๐Ÿ”’
RFC 8628 ยง3.1: the device authorization endpoint. Mints a device_code / user_code pair and returns the verification URIs for the user.
device_error_response ๐Ÿ”’
device_html_response ๐Ÿ”’
device_native_redirect ๐Ÿ”’
device_redirect_response ๐Ÿ”’
device_sso_redirect ๐Ÿ”’
get_device_callback_route ๐Ÿ”’
The authentication return target: renders consent for the authenticated user.
get_device_route ๐Ÿ”’
RFC 8628 ยง3.3: the verification_uri. Shows a user-code entry form, or sends the user through native or SSO authentication before consent.
handle_device_callback_get ๐Ÿ”’
handle_device_callback_post ๐Ÿ”’
handle_device_verify ๐Ÿ”’
post_device_callback_route ๐Ÿ”’