NanoOAuth class abstract final

Central utility for constructing standardized OAuth 2.0 authorization URLs, token request payloads, and PKCE parameters across any identity provider.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

buildAuthorizationCodeBody({required String code, required String redirectUri, required String codeVerifier, String? clientId, String? clientSecret, Map<String, String>? extraParameters}) → Map<String, String>
Builds a standard application/x-www-form-urlencoded payload to exchange an authorization code for access and refresh tokens.
buildAuthorizationUri({required String authorizationEndpoint, required String clientId, required String redirectUri, List<String> scopes = const [], NanoPkce? pkce, String responseType = 'code', String? state, String? nonce, Map<String, String>? extraParameters}) → Uri
Constructs a complete, standards-compliant OAuth 2.0 authorization Uri.
buildClientCredentialsBody({required String clientId, required String clientSecret, List<String>? scopes, Map<String, String>? extraParameters}) → Map<String, String>
Builds a standard token request payload for the Client Credentials grant.
buildDeviceCodeBody({required String clientId, required String deviceCode, String? clientSecret, Map<String, String>? extraParameters}) → Map<String, String>
Builds a standard token request payload for the Device Code grant (RFC 8628).
buildPasswordBody({required String username, required String password, String? clientId, String? clientSecret, List<String>? scopes, Map<String, String>? extraParameters}) → Map<String, String>
Builds a standard token request payload for the Resource Owner Password Credentials grant.
buildRefreshTokenBody({required String refreshToken, String? clientId, String? clientSecret, List<String>? scopes, Map<String, String>? extraParameters}) → Map<String, String>
Builds a standard token request payload for the Refresh Token flow.