@oa2/core
Version:
A comprehensive, RFC-compliant OAuth 2.0 authorization server implementation in TypeScript
23 lines (20 loc) • 739 B
TypeScript
import { ServerConfig, OAuth2Server } from './types.js';
/**
* Creates and configures an OAuth 2.0 server instance.
* Provides a clean, functional interface for handling OAuth 2.0 flows.
*
* @example
* ```typescript
* const storage = new MyStorageAdapter();
* const server = createOAuth2Server({
* storage,
* grants: [createAuthorizationCodeGrant(), clientCredentialsGrant()],
* predefinedScopes: ['read', 'write'],
* tokenStrategy: createJwtTokenStrategy(storage, { secret: 'my-secret' })
* });
* ```
*/
declare function createOAuth2Server(config: ServerConfig): OAuth2Server;
declare const createServer: typeof createOAuth2Server;
export { createOAuth2Server, createServer };
//# sourceMappingURL=server.d.ts.map