pub struct ClientSecret(/* private fields */);Expand description
A client secret from an RFC 7591 registration response.
§Redaction
Renders as ClientSecret(…) under Debug, which is what a panic and an
assert_eq! expand to. It authenticates the client to its authorization
server, so it is the credential a confused-deputy leak hands over, and it is
not the sort of value that belongs in a build log because a comparison
failed. Display stays full: an RFC 7591 client
authenticates with client_secret in a token request body, so the value has
to be serialisable.
Implementations§
Source§impl ClientSecret
impl ClientSecret
Sourcepub fn issued(value: impl AsRef<str>) -> Self
pub fn issued(value: impl AsRef<str>) -> Self
A secret an authorization server has just issued.
Named for where the value comes from rather than left as new, because
the one legitimate source is a registration response and an empty or
placeholder string is not one. Nothing validates the contents: the
server chose them, and inventing a rule here would refuse a legal
server’s identifier. What is enforced is the type — there is no
Default, and Debug redacts, so a secret cannot be conjured by
omission or land in a log by accident.