pub struct TokenRequestSpec {
pub audiences: Vec<String>,
pub expiration_seconds: Option<i64>,
pub bound_object_ref: Option<BoundObjectReference>,
}Expand description
TokenRequestSpec contains client provided parameters of a token request.
Fields§
§audiences: Vec<String>Audiences are the intendend audiences of the token. A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences. +listType=atomic
expiration_seconds: Option<i64>ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the ‘expiration’ field in a response. +optional
bound_object_ref: Option<BoundObjectReference>BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server’s TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation. +optional
Implementations§
Source§impl TokenRequestSpec
impl TokenRequestSpec
Sourcepub fn expiration_seconds(&self) -> i64
pub fn expiration_seconds(&self) -> i64
Returns the value of expiration_seconds, or the default value if expiration_seconds is unset.
Trait Implementations§
Source§impl Clone for TokenRequestSpec
impl Clone for TokenRequestSpec
Source§fn clone(&self) -> TokenRequestSpec
fn clone(&self) -> TokenRequestSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TokenRequestSpec
impl Debug for TokenRequestSpec
Source§impl Default for TokenRequestSpec
impl Default for TokenRequestSpec
Source§impl Hash for TokenRequestSpec
impl Hash for TokenRequestSpec
Source§impl Message for TokenRequestSpec
impl Message for TokenRequestSpec
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.