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
@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
@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
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
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
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
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
@private
# File lib/google/cloud/pubsub/subscription/push_config.rb, line 250 def to_grpc @grpc end