Definition
Assembly: Microsoft.OData.Mcp.Authentication.dll Namespace: Microsoft.OData.Mcp.Authentication.Outbound Inheritance: System.ObjectSyntax
Summary
Runs the RFC 6749 section 4.4 client credentials grant: a confidential client presents its own identifier and secret and receives an access token, with no end user and no elicitation anywhere in the path.Remarks
Perspecs/v3/AUTHENTICATION.md “Grants → Client credentials” the client authentication method is
client_secret_post whenever the authorization server advertises it — or advertises nothing at all,
which RFC 6749 leaves open — and client_secret_basic otherwise; v1 is secret-only, with no client
certificate. Per AUTH-12 the secret is never logged: it travels only in the form or the
Basic header TokenEndpointClient builds, and the Information line here carries only
the redacted token shape.
A client credentials response carries no refresh token — there is no end user session to refresh — so a
caller whose access token has expired re-runs this grant rather than looking for one.
Examples
Constructors
.ctor
Initializes a new instance of the ClientCredentialsGrant class.Syntax
Parameters
Exceptions
.ctor Inherited
Inherited from
objectSyntax
Methods
AcquireAsync
Obtains an access token for the client itself.Syntax
Parameters
Returns
Type:System.Threading.Tasks.Task<Microsoft.OData.Mcp.Authentication.Outbound.TokenEndpointResponse>
The successful token response, which normally carries no refresh token.
Exceptions
Examples
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
ResolveAuthMethod
Selects the token endpoint authentication method this grant uses against an authorization server.Syntax
Parameters
Returns
Type:string
TokenEndpointClient.AuthMethodClientSecretPost when the server advertises it or
advertises nothing at all; otherwise TokenEndpointClient.AuthMethodClientSecretBasic.
Exceptions
Remarks
Public because the caller has to persist the same method on theTokenContainer it stores, so a later silent re-acquisition authenticates exactly the way the
first one did.
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?