google-cloud-os_login 1.6.1 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +32 -1
- data/lib/google/cloud/os_login/version.rb +1 -1
- data/lib/google/cloud/os_login.rb +36 -0
- metadata +4 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e765c74e510a85ecc22c0a57b644262642f581dd0087ae53ab1e5539613f2cdf
|
4
|
+
data.tar.gz: d9e096b14bf022790aa971b830169a1aad6641a72f5c5c2fea255d361fb25475
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdc109a49659926b373f64cb7f8afa10ac90ac560137f862061a66183b57d47d33fb0baa2e66aa039333857965d9c7ea303c2b8178950f38a7b259af5112ed37
|
7
|
+
data.tar.gz: bf3e8fef9ec5b59c1b21d3aa25a177be6b4c813a4bc3d9c7b12263739e13ce7b82e4a58c9953bdaae6796c3f9d375fa7e25654f6a9254647bb1e11c71c00b3b4
|
data/README.md
CHANGED
@@ -43,9 +43,40 @@ and includes substantial interface changes. Existing code written for earlier
|
|
43
43
|
versions of this library will likely require updates to use this version.
|
44
44
|
See the {file:MIGRATING.md MIGRATING.md} document for more information.
|
45
45
|
|
46
|
+
## Debug Logging
|
47
|
+
|
48
|
+
This library comes with opt-in Debug Logging that can help you troubleshoot
|
49
|
+
your application's integration with the API. When logging is activated, key
|
50
|
+
events such as requests and responses, along with data payloads and metadata
|
51
|
+
such as headers and client configuration, are logged to the standard error
|
52
|
+
stream.
|
53
|
+
|
54
|
+
**WARNING:** Client Library Debug Logging includes your data payloads in
|
55
|
+
plaintext, which could include sensitive data such as PII for yourself or your
|
56
|
+
customers, private keys, or other security data that could be compromising if
|
57
|
+
leaked. Always practice good data hygiene with your application logs, and follow
|
58
|
+
the principle of least access. Google also recommends that Client Library Debug
|
59
|
+
Logging be enabled only temporarily during active debugging, and not used
|
60
|
+
permanently in production.
|
61
|
+
|
62
|
+
To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
|
63
|
+
to the value `all`. Alternatively, you can set the value to a comma-delimited
|
64
|
+
list of client library gem names. This will select the default logging behavior,
|
65
|
+
which writes logs to the standard error stream. On a local workstation, this may
|
66
|
+
result in logs appearing on the console. When running on a Google Cloud hosting
|
67
|
+
service such as [Google Cloud Run](https://cloud.google.com/run), this generally
|
68
|
+
results in logs appearing alongside your application logs in the
|
69
|
+
[Google Cloud Logging](https://cloud.google.com/logging/) service.
|
70
|
+
|
71
|
+
Debug logging also requires that the versioned clients for this service be
|
72
|
+
sufficiently recent, released after about Dec 10, 2024. If logging is not
|
73
|
+
working, try updating the versioned clients in your bundle or installed gems:
|
74
|
+
[google-cloud-os_login-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1/latest),
|
75
|
+
[google-cloud-os_login-v1beta](https://cloud.google.com/ruby/docs/reference/google-cloud-os_login-v1beta/latest).
|
76
|
+
|
46
77
|
## Supported Ruby Versions
|
47
78
|
|
48
|
-
This library is supported on Ruby
|
79
|
+
This library is supported on Ruby 3.0+.
|
49
80
|
|
50
81
|
Google provides official support for Ruby versions that are actively supported
|
51
82
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -58,6 +58,11 @@ module Google
|
|
58
58
|
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
59
59
|
# the `transport` parameter.
|
60
60
|
#
|
61
|
+
# Raises an exception if the currently installed versioned client gem for the
|
62
|
+
# given API version does not support the given transport of the OsLoginService service.
|
63
|
+
# You can determine whether the method will succeed by calling
|
64
|
+
# {Google::Cloud::OsLogin.os_login_service_available?}.
|
65
|
+
#
|
61
66
|
# ## About OsLoginService
|
62
67
|
#
|
63
68
|
# Cloud OS Login API
|
@@ -82,6 +87,37 @@ module Google
|
|
82
87
|
service_module.const_get(:Client).new(&block)
|
83
88
|
end
|
84
89
|
|
90
|
+
##
|
91
|
+
# Determines whether the OsLoginService service is supported by the current client.
|
92
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::OsLogin.os_login_service}.
|
93
|
+
# If false, that method will raise an exception. This could happen if the given
|
94
|
+
# API version does not exist or does not support the OsLoginService service,
|
95
|
+
# or if the versioned client gem needs an update to support the OsLoginService service.
|
96
|
+
#
|
97
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
98
|
+
# Defaults to `:v1`.
|
99
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
100
|
+
# @return [boolean] Whether the service is available.
|
101
|
+
#
|
102
|
+
def self.os_login_service_available? version: :v1, transport: :grpc
|
103
|
+
require "google/cloud/os_login/#{version.to_s.downcase}"
|
104
|
+
package_name = Google::Cloud::OsLogin
|
105
|
+
.constants
|
106
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
107
|
+
.first
|
108
|
+
return false unless package_name
|
109
|
+
service_module = Google::Cloud::OsLogin.const_get package_name
|
110
|
+
return false unless service_module.const_defined? :OsLoginService
|
111
|
+
service_module = service_module.const_get :OsLoginService
|
112
|
+
if transport == :rest
|
113
|
+
return false unless service_module.const_defined? :Rest
|
114
|
+
service_module = service_module.const_get :Rest
|
115
|
+
end
|
116
|
+
service_module.const_defined? :Client
|
117
|
+
rescue ::LoadError
|
118
|
+
false
|
119
|
+
end
|
120
|
+
|
85
121
|
##
|
86
122
|
# Configure the google-cloud-os_login library.
|
87
123
|
#
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-os_login
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-29 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: google-cloud-core
|
@@ -85,7 +84,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
85
84
|
licenses:
|
86
85
|
- Apache-2.0
|
87
86
|
metadata: {}
|
88
|
-
post_install_message:
|
89
87
|
rdoc_options: []
|
90
88
|
require_paths:
|
91
89
|
- lib
|
@@ -93,15 +91,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
91
|
requirements:
|
94
92
|
- - ">="
|
95
93
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
94
|
+
version: '3.0'
|
97
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
96
|
requirements:
|
99
97
|
- - ">="
|
100
98
|
- !ruby/object:Gem::Version
|
101
99
|
version: '0'
|
102
100
|
requirements: []
|
103
|
-
rubygems_version: 3.
|
104
|
-
signing_key:
|
101
|
+
rubygems_version: 3.6.2
|
105
102
|
specification_version: 4
|
106
103
|
summary: API Client library for the Cloud OS Login API
|
107
104
|
test_files: []
|