Adds a WordPress plugin that places a customisable "Sign in with Microsoft" button on wp-login.php and signs existing users in via the OpenID Connect authorization code flow with PKCE. Users are matched by e-mail address only; no accounts are created. Security: single-use state/nonce bound to an HttpOnly cookie, ID token signature verification against Microsoft's JWKS (RS256 only) with issuer/audience/tenant/expiry/nonce checks, optional tenant pinning, account binding to the Microsoft object ID, e-mail domain allow-list, client secret encrypted at rest (AES-256-GCM). Admin: settings screen with connection, button and security tabs, live button preview, colour presets, media-library icon picker, redirect URI copy button and tenant connectivity test. Packaging for WordPress.org: readme.txt with External services section, GPL-2.0 license, uninstall.php, POT + German translations, .distignore, build script, PHPCS config and CI running Plugin Check. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JJxAHYdMfKPoN4koRc4Ci2
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
name: PHP lint (${{ matrix.php }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
coverage: none
|
|
- name: Syntax check
|
|
run: find . -path ./vendor -prune -o -name '*.php' -print0 | xargs -0 -n1 php -l
|
|
|
|
phpcs:
|
|
name: WordPress Coding Standards
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.2'
|
|
coverage: none
|
|
tools: composer
|
|
- name: Install dev dependencies
|
|
run: composer install --no-interaction --prefer-dist
|
|
- name: Run PHPCS
|
|
run: vendor/bin/phpcs --report=checkstyle | cs2pr || vendor/bin/phpcs
|
|
|
|
plugin-check:
|
|
name: WordPress.org Plugin Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build distributable
|
|
run: bash bin/build-zip.sh
|
|
- name: Run Plugin Check
|
|
uses: wordpress/plugin-check-action@v1
|
|
with:
|
|
build-dir: ./build/m365-login
|
|
exclude-directories: ''
|