From b23b66a02bff36979868c1788fd7084e64bc9aa9 Mon Sep 17 00:00:00 2001 From: Meghdad Date: Tue, 15 Jul 2025 14:19:47 +0330 Subject: [PATCH] Initial required files --- .gitignore | 9 ++++++++- README.md | 26 +++++++++++++++++++++++++- dabestaniha-authenticate-bridge.php | 1 + views/invalid-token.php | 1 + 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 dabestaniha-authenticate-bridge.php create mode 100644 views/invalid-token.php diff --git a/.gitignore b/.gitignore index 5469669..2b662df 100644 --- a/.gitignore +++ b/.gitignore @@ -45,4 +45,11 @@ wp-config.php # # Note: If you wish to whitelist themes, # uncomment the next line -#/wp-content/themes \ No newline at end of file +#/wp-content/themes + +*.zip +.DS_Store +.idea/ +vendor/ +node_modules/ +.env \ No newline at end of file diff --git a/README.md b/README.md index 4803d0d..9ebbabf 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,26 @@ -# wp-authenticate-bridge +# dabestaniha-authenticate-bridge + Authenticate WordPress user via json web token from Laravel Application. + + +## Features +- Create user if not exists +- Login via JWT token +- Admin settings page +- Custom invalid token page + +## Usage + +Send users to: +https://your-wp-site.com/dabestaniha/login?laravel_login_token=TOKEN + +With required data encoded in the token. + +Payload JWT: +```json +{ + "email": "user@example.com", + "name": "Test User", + "exp": 1752575400 +} +``` \ No newline at end of file diff --git a/dabestaniha-authenticate-bridge.php b/dabestaniha-authenticate-bridge.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/dabestaniha-authenticate-bridge.php @@ -0,0 +1 @@ +