#[repr(C)]pub struct SsAccessToken {
pub data_size: u32,
pub data: [u8],
}Expand description
Equivalent to ACCESSTOKEN in msodbcsql.h. Value of ConnectionAttribute::SS_ACCESS_TOKEN.
Specific to the Microsoft ODBC Driver for SQL Server. A dynamically sized type: pointers to it
are fat and carry the length of data, which must equal data_size. Cast to a thin pointer
before passing it to the driver.
Fields§
§data_size: u32Length of data in bytes. Does not include a terminating zero.
data: [u8]Flexible array member (BYTE data[] in C). Directly follows data_size.
According to Microsoft, a token obtained from an OAuth 2.0 JSON response must be expanded, so each byte is followed by a zero byte. For the ASCII characters of an access token, this equals UTF-16 with little endian byte order. This holds whether the narrow or wide ODBC functions are used, since the driver manager passes the pointer through unchanged.