Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
8 / 8
100.00% covered (success)
100.00%
8 / 8
CRAP
100.00% covered (success)
100.00%
1 / 1
AbstractPreAuthenticationProvider
100.00% covered (success)
100.00%
8 / 8
100.00% covered (success)
100.00%
8 / 8
8
100.00% covered (success)
100.00%
1 / 1
 getAuthenticationRequests
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 testForAuthentication
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 postAuthentication
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 testForAccountCreation
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 testUserForCreation
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 postAccountCreation
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 testForAccountLink
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 postAccountLink
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2/**
3 * @license GPL-2.0-or-later
4 * @file
5 */
6
7namespace MediaWiki\Auth;
8
9/**
10 * A base class that implements some of the boilerplate for a PreAuthenticationProvider
11 *
12 * @stable to extend
13 * @ingroup Auth
14 * @since 1.27
15 */
16abstract class AbstractPreAuthenticationProvider extends AbstractAuthenticationProvider
17    implements PreAuthenticationProvider
18{
19
20    /**
21     * @inheritDoc
22     * @stable to override
23     */
24    public function getAuthenticationRequests( $action, array $options ) {
25        return [];
26    }
27
28    /**
29     * @inheritDoc
30     * @stable to override
31     */
32    public function testForAuthentication( array $reqs ) {
33        return \StatusValue::newGood();
34    }
35
36    /**
37     * @inheritDoc
38     * @stable to override
39     */
40    public function postAuthentication( $user, AuthenticationResponse $response ) {
41    }
42
43    /**
44     * @inheritDoc
45     * @stable to override
46     */
47    public function testForAccountCreation( $user, $creator, array $reqs ) {
48        return \StatusValue::newGood();
49    }
50
51    /**
52     * @inheritDoc
53     * @stable to override
54     */
55    public function testUserForCreation( $user, $autocreate, array $options = [] ) {
56        return \StatusValue::newGood();
57    }
58
59    /**
60     * @inheritDoc
61     * @stable to override
62     */
63    public function postAccountCreation( $user, $creator, AuthenticationResponse $response ) {
64    }
65
66    /**
67     * @inheritDoc
68     * @stable to override
69     */
70    public function testForAccountLink( $user ) {
71        return \StatusValue::newGood();
72    }
73
74    /**
75     * @inheritDoc
76     * @stable to override
77     */
78    public function postAccountLink( $user, AuthenticationResponse $response ) {
79    }
80
81}