googleauth - Class Google::Auth::IDTokens::KeyInfo (v1.12.2) Stay organized with collections Save and categorize content based on your preferences.
Reference documentation and code samples for the googleauth class Google::Auth::IDTokens::KeyInfo.
A public key used for verifying ID tokens.
This includes the public key data, ID, and the algorithm used forsignature verification. RSA and Elliptical Curve (EC) keys aresupported.
Inherits
- Object
Methods
.from_jwk
defself.from_jwk(jwk)->KeyInfoCreate a KeyInfo from a single JWK, which may be given as either ahash or an unparsed JSON string.
- jwk (Hash, String) — The JWK specification.
- (KeyInfo)
- (KeySourceError) — If the key could not be extracted from theJWK.
.from_jwk_set
defself.from_jwk_set(jwk_set)->Array<KeyInfo>Create an array of KeyInfo from a JWK Set, which may be given aseither a hash or an unparsed JSON string.
- jwk (Hash, String) — The JWK Set specification.
- (Array<KeyInfo>)
- (KeySourceError) — If a key could not be extracted from theJWK Set.
#algorithm
defalgorithm()->StringThe signature algorithm. (normallyRS256 orES256)
- (String)
#id
defid()->StringThe key ID.
- (String)
#initialize
definitialize(id:nil,key:nil,algorithm:nil)->KeyInfoCreate a public key info structure.
- id (String)(defaults to: nil) — The key ID.
- key (OpenSSL::PKey::RSA, OpenSSL::PKey::EC)(defaults to: nil) — The key itself.
- algorithm (String)(defaults to: nil) — The algorithm (normally
RS256orES256)
- (KeyInfo) — a new instance of KeyInfo
#key
defkey()->OpenSSL::PKey::RSA,OpenSSL::PKey::ECThe key itself.
- (OpenSSL::PKey::RSA, OpenSSL::PKey::EC)
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.