bitwarden_auth/api/enums/grant_type.rs
1use serde::{Deserialize, Serialize};
2
3/// Represents the OAuth 2.0 grant types recognized by the Bitwarden API.
4/// A grant type specifies the method a client uses to obtain an access token,
5/// as defined in [RFC 6749, Section 4](https://datatracker.ietf.org/doc/html/rfc6749#section-4)
6/// or by custom Bitwarden extensions. The value is sent in the `grant_type` parameter
7/// of a token request.
8#[derive(Serialize, Deserialize, Debug)]
9#[serde(rename_all = "snake_case")]
10pub(crate) enum GrantType {
11 /// A custom extension grant type for requesting send access tokens outside the context of a
12 /// Bitwarden user.
13 SendAccess,
14 // TODO: Add other grant types as needed.
15}