Skip to main content

create_device_authorization

Function create_device_authorization 

Source
async fn create_device_authorization(
    conn: &mut PgConnection,
    form: &DeviceAuthorizationForm,
    token_hmac_key: &SecretString,
    base_url: &str,
) -> Result<DeviceAuthorizationResponse, ControllerError>
Expand description

Core of POST /device_authorization: look up the client, gate on the device-code grant, validate scopes, generate + store the codes, and build the RFC 8628 response. verification_uri is derived as {base_url}/oauth_device.