Struct graph_oauth::ProofKeyCodeExchange
source · pub struct ProofKeyCodeExchange {
pub code_verifier: String,
pub code_challenge: String,
pub code_challenge_method: String,
}
Fields§
§code_verifier: String
Used to verify the the The code verifier is not included in the authorization URL. You can set the code verifier here and then use the From trait for [AuthorizationCodeCredential] which does use the code verifier.
code_challenge: String
Used to secure authorization code grants by using Proof Key for Code Exchange (PKCE). Required if code_challenge_method is included. For more information, see the PKCE RFC. This parameter is now recommended for all application types, both public and confidential clients, and required by the Microsoft identity platform for single page apps using the authorization code flow.
code_challenge_method: String
The method used to encode the code_verifier for the code_challenge parameter. This SHOULD be S256, but the spec allows the use of plain if the client can’t support SHA256.
If excluded, code_challenge is assumed to be plaintext if code_challenge is included. The Microsoft identity platform supports both plain and S256. For more information, see the PKCE RFC. This parameter is required for single page apps using the authorization code flow.
Implementations§
source§impl ProofKeyCodeExchange
impl ProofKeyCodeExchange
pub fn new<T>( code_verifier: T, code_challenge: T, code_challenge_method: T ) -> Result<ProofKeyCodeExchange, AuthorizationFailure>
Trait Implementations§
source§impl Clone for ProofKeyCodeExchange
impl Clone for ProofKeyCodeExchange
source§fn clone(&self) -> ProofKeyCodeExchange
fn clone(&self) -> ProofKeyCodeExchange
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl GenPkce for ProofKeyCodeExchange
impl GenPkce for ProofKeyCodeExchange
fn code_challenge_method() -> String
source§fn code_verifier() -> String
fn code_verifier() -> String
fn code_challenge(code_verifier: &String) -> String
source§fn oneshot() -> Result<ProofKeyCodeExchange, AuthorizationFailure>
fn oneshot() -> Result<ProofKeyCodeExchange, AuthorizationFailure>
source§impl Hash for ProofKeyCodeExchange
impl Hash for ProofKeyCodeExchange
source§impl Ord for ProofKeyCodeExchange
impl Ord for ProofKeyCodeExchange
source§fn cmp(&self, other: &ProofKeyCodeExchange) -> Ordering
fn cmp(&self, other: &ProofKeyCodeExchange) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ProofKeyCodeExchange
impl PartialEq for ProofKeyCodeExchange
source§fn eq(&self, other: &ProofKeyCodeExchange) -> bool
fn eq(&self, other: &ProofKeyCodeExchange) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ProofKeyCodeExchange
impl PartialOrd for ProofKeyCodeExchange
source§fn partial_cmp(&self, other: &ProofKeyCodeExchange) -> Option<Ordering>
fn partial_cmp(&self, other: &ProofKeyCodeExchange) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for ProofKeyCodeExchange
impl StructuralPartialEq for ProofKeyCodeExchange
Auto Trait Implementations§
impl Freeze for ProofKeyCodeExchange
impl RefUnwindSafe for ProofKeyCodeExchange
impl Send for ProofKeyCodeExchange
impl Sync for ProofKeyCodeExchange
impl Unpin for ProofKeyCodeExchange
impl UnwindSafe for ProofKeyCodeExchange
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.