class Google::Cloud::PubSub::Subscription::PushConfig::OidcToken

Contains information needed for generating an [OpenID Connect token](developers.google.com/identity/protocols/OpenIDConnect).

Public Class Methods

from_grpc(grpc) click to toggle source

@private

# File lib/google/cloud/pubsub/subscription/push_config.rb, line 256
def self.from_grpc grpc
  grpc ||= Google::Cloud::PubSub::V1::PushConfig::OidcToken.new

  new.tap do |pc|
    pc.instance_variable_set :@grpc, grpc.dup
  end
end
new() click to toggle source

@private

# File lib/google/cloud/pubsub/subscription/push_config.rb, line 204
def initialize
  @grpc = Google::Cloud::PubSub::V1::PushConfig::OidcToken.new
end

Public Instance Methods

audience() click to toggle source

The audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the `endpoint` URL will be used.

@return [String]

# File lib/google/cloud/pubsub/subscription/push_config.rb, line 233
def audience
  @grpc.audience
end
audience=(new_audience) click to toggle source

Sets the audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the `endpoint` URL will be used.

@param [String] new_audience New audience value.

# File lib/google/cloud/pubsub/subscription/push_config.rb, line 244
def audience= new_audience
  @grpc.audience = new_audience
end
email() click to toggle source

The service account email to be used for generating the OIDC token. The caller must have the `iam.serviceAccounts.actAs` permission for the service account.

@return [String]

# File lib/google/cloud/pubsub/subscription/push_config.rb, line 213
def email
  @grpc.service_account_email
end
email=(new_email) click to toggle source

Sets the service account email to be used for generating the OIDC token. The caller must have the `iam.serviceAccounts.actAs` permission for the service account.

@param [String] new_email New service account email value.

# File lib/google/cloud/pubsub/subscription/push_config.rb, line 222
def email= new_email
  @grpc.service_account_email = new_email
end
to_grpc() click to toggle source

@private

# File lib/google/cloud/pubsub/subscription/push_config.rb, line 250
def to_grpc
  @grpc
end