Struct gapi_grpc::google::api::AuthProvider[][src]

pub struct AuthProvider {
    pub id: String,
    pub issuer: String,
    pub jwks_uri: String,
    pub audiences: String,
    pub authorization_url: String,
    pub jwt_locations: Vec<JwtLocation>,
}

Configuration for an authentication provider, including support for JSON Web Token (JWT).

Fields

id: String

The unique identifier of the auth provider. It will be referred to by AuthRequirement.provider_id.

Example: “bookstore_auth”.

issuer: String

Identifies the principal that issued the JWT. See https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 Usually a URL or an email address.

Example: https://securetoken.google.com Example: 1234567-compute@developer.gserviceaccount.com

jwks_uri: String

URL of the provider’s public key set to validate signature of the JWT. See OpenID Discovery. Optional if the key set document:

Example: https://www.googleapis.com/oauth2/v1/certs

audiences: String

The list of JWT audiences. that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, JWTs with audiences:

https://library-example.googleapis.com/google.example.library.v1.LibraryService

Example:

audiences: bookstore_android.apps.googleusercontent.com,
           bookstore_web.apps.googleusercontent.com
authorization_url: String

Redirect URL if JWT token is required but not present or is expired. Implement authorizationUrl of securityDefinitions in OpenAPI spec.

jwt_locations: Vec<JwtLocation>

Defines the locations to extract the JWT.

JWT locations can be either from HTTP headers or URL query parameters. The rule is that the first match wins. The checking order is: checking all headers first, then URL query parameters.

If not specified, default to use following 3 locations:

  1. Authorization: Bearer
  2. x-goog-iap-jwt-assertion
  3. access_token query parameter

Default locations can be specified as followings: jwt_locations:

Trait Implementations

impl Clone for AuthProvider[src]

impl Debug for AuthProvider[src]

impl Default for AuthProvider[src]

impl Message for AuthProvider[src]

impl PartialEq<AuthProvider> for AuthProvider[src]

impl StructuralPartialEq for AuthProvider[src]

Auto Trait Implementations

impl RefUnwindSafe for AuthProvider

impl Send for AuthProvider

impl Sync for AuthProvider

impl Unpin for AuthProvider

impl UnwindSafe for AuthProvider

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]