ping_identity_dart_auth_sdk 0.0.1
ping_identity_dart_auth_sdk: ^0.0.1 copied to clipboard
A Dart OIDC and OAuth 2.0 helper for Ping-compatible identity providers such as PingOne and PingFederate.
Ping Identity Dart Auth SDK #
ping_identity_dart_auth_sdk is a standards-based Dart helper for OpenID Connect
and OAuth 2.0 flows used with Ping-compatible identity providers.
The package is intentionally built around OIDC and OAuth primitives instead of a PingOne-only API so it can be reused across:
- PingOne
- PingFederate
- PingOne Advanced Identity Cloud
- other Ping deployments that expose standard OIDC endpoints
What It Covers #
- OpenID Connect discovery
- Authorization URL generation
- PKCE generation for public clients
- Authorization code exchange
- Refresh token exchange
- Token revocation
- UserInfo requests
- Non-validating JWT payload decoding for ID token inspection
Installation #
dependencies:
ping_identity_dart_auth_sdk: ^0.1.0
Quick Start #
import 'package:ping_identity_dart_auth_sdk/ping_identity_dart_auth_sdk.dart';
Future<void> main() async {
final client = await PingOidcClient.discover(
const PingOidcConfig(
issuer: 'https://auth.example.com',
clientId: 'dart-cli',
redirectUri: 'http://localhost:8080/callback',
scopes: ['openid', 'profile', 'email', 'offline_access'],
),
);
final request = client.createAuthorizationRequest();
print('Open this URL in a browser:');
print(request.authorizationUri);
// Exchange the authorization code after your callback handler receives it.
// final token = await client.exchangeAuthorizationCode(
// code: receivedCode,
// codeVerifier: request.pkce.verifier,
// );
}
Package Direction #
This package is backend-friendly and standards-first. Product-specific presets for PingOne or PingFederate can be layered on top of the core OIDC helpers later without locking the package to a single Ping deployment model.
Documentation #
Additional package docs live under docs/ in this repository.