pub struct OidcClientAssertionKeyBuilder { /* private fields */ }
Expand description
Builder for OidcClientAssertionKey
.
Implementations§
Source§impl OidcClientAssertionKeyBuilder
impl OidcClientAssertionKeyBuilder
Sourcepub fn pem_key(&mut self, value: String) -> &mut Self
pub fn pem_key(&mut self, value: String) -> &mut Self
PemKey is an RSA private key, in pem format. It is used to sign the JWT.
Mutually exclusive with PemKeyFile
.
Sourcepub fn pem_key_file(&mut self, value: String) -> &mut Self
pub fn pem_key_file(&mut self, value: String) -> &mut Self
PemKeyFile is an absolute path to a private key on Nomad servers’ disk,
in pem format. It is used to sign the JWT.
Mutually exclusive with PemKey
.
Sourcepub fn key_id_header(
&mut self,
value: OidcClientAssertionKeyIdHeader,
) -> &mut Self
pub fn key_id_header( &mut self, value: OidcClientAssertionKeyIdHeader, ) -> &mut Self
KeyIDHeader is which header the provider will use to find the public key to verify the signed JWT. Its default values vary based on which of the other required fields is set:
- KeyID: “kid”
- PemCert: “x5t#S256”
- PemCertFile: “x5t#S256”
Refer to the JWS RFC for information on these headers:
- “kid”: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.4
- “x5t”: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.7
- “x5t#S256”: https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.8
If you need to set some other header not supported here, you may use OIDCClientAssertion.ExtraHeaders.
Sourcepub fn key_id(&mut self, value: String) -> &mut Self
pub fn key_id(&mut self, value: String) -> &mut Self
KeyID may be set manually and becomes the “kid” header.
Mutually exclusive with PemCert
and PemCertFile
.
Allowed KeyIDHeader
values: “kid” (the default)
Sourcepub fn pem_cert(&mut self, value: String) -> &mut Self
pub fn pem_cert(&mut self, value: String) -> &mut Self
PemCert is an x509 certificate, signed by the private key or a CA,
in pem format. It is used to derive an x5t#S256 (or x5t) header.
Mutually exclusive with PemCertFile
and KeyID
.
Allowed KeyIDHeader
values: “x5t”, “x5t#S256” (default “x5t#S256”)
Sourcepub fn pem_cert_file(&mut self, value: String) -> &mut Self
pub fn pem_cert_file(&mut self, value: String) -> &mut Self
PemCertFile is an absolute path to an x509 certificate on Nomad servers’
disk, signed by the private key or a CA, in pem format.
It is used to derive an x5t#S256 (or x5t) header.
Mutually exclusive with PemCert
and KeyID
.
Allowed KeyIDHeader
values: “x5t”, “x5t#S256” (default “x5t#S256”)
Sourcepub fn build(
&self,
) -> Result<OidcClientAssertionKey, OidcClientAssertionKeyBuilderError>
pub fn build( &self, ) -> Result<OidcClientAssertionKey, OidcClientAssertionKeyBuilderError>
Trait Implementations§
Source§impl Clone for OidcClientAssertionKeyBuilder
impl Clone for OidcClientAssertionKeyBuilder
Source§fn clone(&self) -> OidcClientAssertionKeyBuilder
fn clone(&self) -> OidcClientAssertionKeyBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more