OAuth
Less than 1 minute
OAuth
OAuth 2.1 authorization server controller.
class OAuth extends \Hazaar\OAuth\ServerExtends: Hazaar\OAuth\Server
Extend this to turn an application into an MCP OAuth authorization server. See Hazaar\OAuth\Server for the implementation, configuration and the consent() hook to implement, and mount its actions in route.php:
Router::get('/.well-known/oauth-authorization-server', [MyAuthServer::class, 'metadata']);
Router::get('/authorize', [MyAuthServer::class, 'authorize']);
Router::post('/authorize', [MyAuthServer::class, 'authorize']);
Router::post('/token', [MyAuthServer::class, 'token']);
Router::post('/register', [MyAuthServer::class, 'register']);Generated by Hazaar API Doc Generator on Sun, 23 Aug 2026 10:49:43 +0000