All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.AuthProviderKt.kt Maven / Gradle / Ivy

// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/auth.proto

// Generated files should ignore deprecation warnings
@file:Suppress("DEPRECATION")
package com.google.api;

@kotlin.jvm.JvmName("-initializeauthProvider")
public inline fun authProvider(block: com.google.api.AuthProviderKt.Dsl.() -> kotlin.Unit): com.google.api.AuthProvider =
  com.google.api.AuthProviderKt.Dsl._create(com.google.api.AuthProvider.newBuilder()).apply { block() }._build()
/**
 * ```
 * Configuration for an anthentication provider, including support for
 * [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).
 * ```
 *
 * Protobuf type `google.api.AuthProvider`
 */
public object AuthProviderKt {
  @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class)
  @com.google.protobuf.kotlin.ProtoDslMarker
  public class Dsl private constructor(
    private val _builder: com.google.api.AuthProvider.Builder
  ) {
    public companion object {
      @kotlin.jvm.JvmSynthetic
      @kotlin.PublishedApi
      internal fun _create(builder: com.google.api.AuthProvider.Builder): Dsl = Dsl(builder)
    }

    @kotlin.jvm.JvmSynthetic
    @kotlin.PublishedApi
    internal fun _build(): com.google.api.AuthProvider = _builder.build()

    /**
     * ```
     * The unique identifier of the auth provider. It will be referred to by
     * `AuthRequirement.provider_id`.
     *
     * Example: "bookstore_auth".
     * ```
     *
     * `string id = 1;`
     */
    public var id: kotlin.String
      @JvmName("getId")
      get() = _builder.getId()
      @JvmName("setId")
      set(value) {
        _builder.setId(value)
      }
    /**
     * ```
     * The unique identifier of the auth provider. It will be referred to by
     * `AuthRequirement.provider_id`.
     *
     * Example: "bookstore_auth".
     * ```
     *
     * `string id = 1;`
     */
    public fun clearId() {
      _builder.clearId()
    }

    /**
     * ```
     * 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: [email protected]
     * ```
     *
     * `string issuer = 2;`
     */
    public var issuer: kotlin.String
      @JvmName("getIssuer")
      get() = _builder.getIssuer()
      @JvmName("setIssuer")
      set(value) {
        _builder.setIssuer(value)
      }
    /**
     * ```
     * 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: [email protected]
     * ```
     *
     * `string issuer = 2;`
     */
    public fun clearIssuer() {
      _builder.clearIssuer()
    }

    /**
     * ```
     * URL of the provider's public key set to validate signature of the JWT. See
     * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
     * Optional if the key set document:
     *  - can be retrieved from
     *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
     *    of the issuer.
     *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
     *
     * Example: https://www.googleapis.com/oauth2/v1/certs
     * ```
     *
     * `string jwks_uri = 3;`
     */
    public var jwksUri: kotlin.String
      @JvmName("getJwksUri")
      get() = _builder.getJwksUri()
      @JvmName("setJwksUri")
      set(value) {
        _builder.setJwksUri(value)
      }
    /**
     * ```
     * URL of the provider's public key set to validate signature of the JWT. See
     * [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata).
     * Optional if the key set document:
     *  - can be retrieved from
     *    [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html
     *    of the issuer.
     *  - can be inferred from the email domain of the issuer (e.g. a Google service account).
     *
     * Example: https://www.googleapis.com/oauth2/v1/certs
     * ```
     *
     * `string jwks_uri = 3;`
     */
    public fun clearJwksUri() {
      _builder.clearJwksUri()
    }

    /**
     * ```
     * The list of JWT
     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
     * that are allowed to access. A JWT containing any of these audiences will
     * be accepted. When this setting is absent, only JWTs with audience
     * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
     * will be accepted. For example, if no audiences are in the setting,
     * LibraryService API will only accept JWTs with the following audience
     * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
     *
     * Example:
     *
     *     audiences: bookstore_android.apps.googleusercontent.com,
     *                bookstore_web.apps.googleusercontent.com
     * ```
     *
     * `string audiences = 4;`
     */
    public var audiences: kotlin.String
      @JvmName("getAudiences")
      get() = _builder.getAudiences()
      @JvmName("setAudiences")
      set(value) {
        _builder.setAudiences(value)
      }
    /**
     * ```
     * The list of JWT
     * [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3).
     * that are allowed to access. A JWT containing any of these audiences will
     * be accepted. When this setting is absent, only JWTs with audience
     * "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]"
     * will be accepted. For example, if no audiences are in the setting,
     * LibraryService API will only accept JWTs with the following audience
     * "https://library-example.googleapis.com/google.example.library.v1.LibraryService".
     *
     * Example:
     *
     *     audiences: bookstore_android.apps.googleusercontent.com,
     *                bookstore_web.apps.googleusercontent.com
     * ```
     *
     * `string audiences = 4;`
     */
    public fun clearAudiences() {
      _builder.clearAudiences()
    }

    /**
     * ```
     * Redirect URL if JWT token is required but no present or is expired.
     * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
     * ```
     *
     * `string authorization_url = 5;`
     */
    public var authorizationUrl: kotlin.String
      @JvmName("getAuthorizationUrl")
      get() = _builder.getAuthorizationUrl()
      @JvmName("setAuthorizationUrl")
      set(value) {
        _builder.setAuthorizationUrl(value)
      }
    /**
     * ```
     * Redirect URL if JWT token is required but no present or is expired.
     * Implement authorizationUrl of securityDefinitions in OpenAPI spec.
     * ```
     *
     * `string authorization_url = 5;`
     */
    public fun clearAuthorizationUrl() {
      _builder.clearAuthorizationUrl()
    }
  }
}
@kotlin.jvm.JvmSynthetic
public inline fun com.google.api.AuthProvider.copy(block: `com.google.api`.AuthProviderKt.Dsl.() -> kotlin.Unit): com.google.api.AuthProvider =
  `com.google.api`.AuthProviderKt.Dsl._create(this.toBuilder()).apply { block() }._build()





© 2015 - 2024 Weber Informatics LLC | Privacy Policy