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 @@ +