stable

Clone or download

Read-only

Move the logic to parse an Authorization header with the Basic scheme outside the prometheus_metrics plugin

The endpoint delivering the OAuth2 access token will also needs to deal with basic authentication. This contribution extracts the logic around that to make it possible to reuse it without duplicating code. No functional change is expected. This is part of story #14542: have OAuth2 flow Change-Id: I1c8d732a14cea9a6610d0dde4e9287bf55d7299f

Modified Files

Name
R plugins/prometheus_metrics/include/BasicAuthCredential.php Go to diff View file
M plugins/prometheus_metrics/include/MetricsAuthentication.php +21 −17 Go to diff View file
M plugins/prometheus_metrics/include/prometheus_metricsPlugin.php +2 −0 Go to diff View file
R plugins/prometheus_metrics/phpunit/BasicAuthCredentialTest.php Go to diff View file
M plugins/prometheus_metrics/phpunit/MetricsAuthenticationTest.php +2 −1 Go to diff View file
A src/common/Http/Server/Authentication/BasicAuthLoginExtractor.php +46 −0 Go to diff View file
A src/common/Http/Server/Authentication/LoginCredentialSet.php +56 −0 Go to diff View file
A tests/phpunit/common/Http/Server/Authentication/BasicAuthLoginExtractorTest.php +91 −0 Go to diff View file