pub struct SolanaGatewayAuthorization {
pub subject: String,
pub issuer: String,
pub key_class: KeyClass,
pub metering_key: String,
pub target_id: String,
pub limits: Limits,
pub plan: Option<String>,
pub expires_at: u64,
pub jti: String,
}Expand description
Authorization for one regional Solana gateway binding.
Fields§
§subject: String§issuer: String§key_class: KeyClass§metering_key: String§target_id: String§limits: Limits§plan: Option<String>§expires_at: u64§jti: StringImplementations§
Source§impl SolanaGatewayAuthorization
impl SolanaGatewayAuthorization
Sourcepub fn validate_target(
context: &AuthContext,
expected_target_id: &str,
) -> Result<(), SolanaGatewayAuthorizationError>
pub fn validate_target( context: &AuthContext, expected_target_id: &str, ) -> Result<(), SolanaGatewayAuthorizationError>
Validate only the stable audience and exact gateway target claims.
Sourcepub fn try_from_context(
context: &AuthContext,
expected_target_id: &str,
required_scope: SolanaGatewayScope,
) -> Result<SolanaGatewayAuthorization, SolanaGatewayAuthorizationError>
pub fn try_from_context( context: &AuthContext, expected_target_id: &str, required_scope: SolanaGatewayScope, ) -> Result<SolanaGatewayAuthorization, SolanaGatewayAuthorizationError>
Validate verified claims against an exact gateway binding and permission.
Trait Implementations§
Source§impl Clone for SolanaGatewayAuthorization
impl Clone for SolanaGatewayAuthorization
Source§fn clone(&self) -> SolanaGatewayAuthorization
fn clone(&self) -> SolanaGatewayAuthorization
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 moreAuto Trait Implementations§
impl Freeze for SolanaGatewayAuthorization
impl RefUnwindSafe for SolanaGatewayAuthorization
impl Send for SolanaGatewayAuthorization
impl Sync for SolanaGatewayAuthorization
impl Unpin for SolanaGatewayAuthorization
impl UnsafeUnpin for SolanaGatewayAuthorization
impl UnwindSafe for SolanaGatewayAuthorization
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