pub struct ServerMetadata {
pub issuer: String,
pub authorization_endpoint: String,
pub token_endpoint: String,
pub registration_endpoint: Option<String>,
pub scopes_supported: Option<Vec<String>>,
}Expand description
What an OAuth 2.0 server publishes about itself at its well-known endpoint.
Fields§
§issuer: StringWho issues the tokens, as the server names itself.
Where to send someone to approve the client.
token_endpoint: StringWhere codes and refresh tokens are traded for tokens.
registration_endpoint: Option<String>Where a client registers itself, on a server that lets it.
scopes_supported: Option<Vec<String>>The scopes the server knows, when it lists them.
Implementations§
Source§impl ServerMetadata
impl ServerMetadata
Sourcepub fn for_hey(base_url: &str) -> ServerMetadata
pub fn for_hey(base_url: &str) -> ServerMetadata
HEY’s endpoints under base_url. HEY publishes no well-known document, so
OAuthClient::discover has nothing to find there; this is where hey-cli sends
people and tokens.
Trait Implementations§
Source§impl Clone for ServerMetadata
impl Clone for ServerMetadata
Source§fn clone(&self) -> ServerMetadata
fn clone(&self) -> ServerMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerMetadata
impl Debug for ServerMetadata
Source§impl<'de> Deserialize<'de> for ServerMetadata
impl<'de> Deserialize<'de> for ServerMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ServerMetadata
Source§impl PartialEq for ServerMetadata
impl PartialEq for ServerMetadata
Source§impl Serialize for ServerMetadata
impl Serialize for ServerMetadata
impl StructuralPartialEq for ServerMetadata
Auto Trait Implementations§
impl Freeze for ServerMetadata
impl RefUnwindSafe for ServerMetadata
impl Send for ServerMetadata
impl Sync for ServerMetadata
impl Unpin for ServerMetadata
impl UnsafeUnpin for ServerMetadata
impl UnwindSafe for ServerMetadata
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.