#[non_exhaustive]pub enum AceProfile {
CoapDtls,
CoapOscore,
Other(i32),
}Expand description
Profiles for ACE-OAuth as specified in section 5.8.4.3 of RFC 9200.
ACE-OAuth profiles are used in the AccessTokenResponse if the client previously sent
an AccessTokenRequest with the ace_profile field set.
There are at the moment two profiles for ACE-OAuth which are not drafts:
If you wish to use a different profile, you need to specify a user-defined CBOR integer for it
using the Other variant.
§Example
For example, if you wish to indicate in your response that the DTLS profile is used:
let request = AccessTokenResponse::builder()
.access_token(vec![1,2,3,4])
.ace_profile(AceProfile::CoapDtls)
.build()?;It’s also possible to use your own value for a custom profile, as defined in section 8.8 of RFC 9200:
let request = AccessTokenResponse::builder()
.access_token(vec![1,2,3,4])
// values below -65536 marked for private use.
.ace_profile(AceProfile::Other(-99999))
.build()?;Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CoapDtls
Profile for ACE-OAuth using Datagram Transport Layer Security, specified in RFC 9202.
CoapOscore
Profile for ACE-OAuth using OSCORE, specified in RFC 9203.
Other(i32)
An unspecified ACE-OAuth profile along with its representation in CBOR.
See section 8.8 of RFC 9200 for details.
Trait Implementations§
Source§impl Clone for AceProfile
impl Clone for AceProfile
Source§fn clone(&self) -> AceProfile
fn clone(&self) -> AceProfile
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more