| 1 | <?php  | 
            ||
| 23 | class Certificate implements AuthProviderInterface  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 24 | { | 
            ||
| 25 | /**  | 
            ||
| 26 | * Path to certificate.  | 
            ||
| 27 | *  | 
            ||
| 28 | * @var string  | 
            ||
| 29 | */  | 
            ||
| 30 | private $certificatePath;  | 
            ||
| 31 | |||
| 32 | /**  | 
            ||
| 33 | * Certificate secret.  | 
            ||
| 34 | *  | 
            ||
| 35 | * @var string  | 
            ||
| 36 | */  | 
            ||
| 37 | private $certificateSecret;  | 
            ||
| 38 | |||
| 39 | /**  | 
            ||
| 40 | * This provider accepts the following options:  | 
            ||
| 41 | *  | 
            ||
| 42 | * - certificate_path  | 
            ||
| 43 | * - certificate_secret  | 
            ||
| 44 | *  | 
            ||
| 45 | * @param array $options  | 
            ||
| 46 | */  | 
            ||
| 47 | private function __construct(array $options)  | 
            ||
| 52 | |||
| 53 | /**  | 
            ||
| 54 | * Create Certificate Auth provider.  | 
            ||
| 55 | *  | 
            ||
| 56 | * @param array $options  | 
            ||
| 57 | * @return Certificate  | 
            ||
| 58 | */  | 
            ||
| 59 | public static function create(array $options): Certificate  | 
            ||
| 63 | |||
| 64 | /**  | 
            ||
| 65 | * Authenticate client.  | 
            ||
| 66 | *  | 
            ||
| 67 | * @param Request $request  | 
            ||
| 68 | */  | 
            ||
| 69 | public function authenticateClient(Request $request)  | 
            ||
| 79 | }  |