wordpress_jwt_auth 1.0.0
wordpress_jwt_auth: ^1.0.0 copied to clipboard
Dart client for the JWT Authentication for WP REST API WordPress plugin. Login, token validation, typed errors and pluggable token storage.
1.0.0 #
First release as a package. The repository previously held only the example app.
WordPressJwtAuthclient forPOST /jwt-auth/v1/tokenandPOST /jwt-auth/v1/token/validate.currentUser()reads the token owner fromGET /wp/v2/users/me?context=edit, no plugin patch needed.- Optional
register()against the endpoint shipped inwordpress/jwt-auth-register.php. - Sealed
JwtAuthExceptionhierarchy with HTML stripped messages:InvalidCredentialsException,InvalidTokenException,ServerConfigurationException,RegistrationException,NetworkException,UnexpectedResponseException. JwtClaimsdecodesexpand the user ID from the token without a network call.TokenStorageinterface withInMemoryTokenStorage; the example app implements it withflutter_secure_storage.JwtAuthInterceptoradds the bearer header to any Dio instance.