Table of Contents

Struct ClientSecret

Namespace
Fdyay.AccessTokenManagement
Assembly
Fdyay.AccessTokenManagement.dll

The client_secret this client authenticates with.

public readonly record struct ClientSecret : IEquatable<ClientSecret>
Implements
Inherited Members

Remarks

ToString() redacts. A secret reaches a log the moment something interpolates the object that holds it — an exception message, a debug dump, a structured-logging destructuring policy — and none of those call sites know they are handling a credential. The one that needs the real value asks for Value, which is a deliberate act.

Properties

Value

The client secret in plain text, as given to Parse(string).

public string Value { get; }

Property Value

string

Methods

Parse(string)

Wraps a string as a ClientSecret.

public static ClientSecret Parse(string value)

Parameters

value string

The client secret in plain text; must not be null, empty or whitespace.

Returns

ClientSecret

The wrapped value.

Exceptions

ArgumentException

value is null, empty or whitespace.

ToString()

public override string ToString()

Returns

string

Remarks

This replaces the generated ToString rather than sitting beside it, so there is no compiler-written member left that would print the value.