MCP PHP SDK

TokenEndpointAuthMethod : string

How the client proves who it is at the token endpoint (RFC 7591 "token_endpoint_auth_method").

Tags
author

Christopher Hertel mail@christopher-hertel.de

Table of Contents

Cases

ClientSecretBasic  = 'client_secret_basic'
Client id and secret in the HTTP Basic authorization header (RFC 6749 section 2.3.1).
ClientSecretPost  = 'client_secret_post'
Client id and secret in the request body.
None  = 'none'
Public client: no client authentication at all, PKCE carries the security.
PrivateKeyJwt  = 'private_key_jwt'
A JWT assertion signed with the client's private key (RFC 7523).

Methods

negotiate()  : self
Pick the method for the advertised list: no list means Basic (RFC 8414), and a client without a secret or key is public.

Cases

ClientSecretBasic

Client id and secret in the HTTP Basic authorization header (RFC 6749 section 2.3.1).

Methods

negotiate()

Pick the method for the advertised list: no list means Basic (RFC 8414), and a client without a secret or key is public.

public static negotiate(array<string|int, string> $supported, bool $hasSecret[, bool $hasPrivateKey = false ][, bool $mayBePublic = true ]) : self
Parameters
$supported : array<string|int, string>

the server's token_endpoint_auth_methods_supported

$hasSecret : bool
$hasPrivateKey : bool = false
$mayBePublic : bool = true

false for a grant that requires client authentication, like client credentials

Return values
self
On this page

Search results