Overview of openid-client API Reference
mainThe openid-client library provides a comprehensive set of tools for implementing OpenID Connect (OIDC) and OAuth 2.0 flows. The API is organized into several functional areas:
- Grants: Implementation of various OAuth 2.0 flows including
authorizationCodeGrant,clientCredentialsGrant,refreshTokenGrant,initiateDeviceAuthorization, andinitiateBackchannelAuthentication(CIBA). - Authorization Request: Utilities for constructing requests, such as
buildAuthorizationUrl,calculatePKCECodeChallenge, and generatingrandomNonceorrandomState. - Configuration: Methods for global and instance-specific settings via
discoveryand theConfigurationclass. - Client Authentication: Support for multiple methods including
ClientSecretBasic,ClientSecretJwt,ClientSecretPost,PrivateKeyJwt, andTlsClientAuth. - Protected Resource Requests: Methods to interact with APIs using tokens, such as
fetchProtectedResourceandfetchUserInfo. - Token Management: Tools for
tokenIntrospectionandtokenRevocation. - Security Extensions: Support for
DPoP(Demonstrating Proof-of-Possession) andPKCE(Proof Key for Code Exchange).