mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-15 17:56:14 +05:30
Missing provider class
Signed-off-by: Alex Bilbie <alex@alexbilbie.com>
This commit is contained in:
parent
0897e6226c
commit
99f54d1a02
19
src/Oauth2/Client/Provider.php
Executable file
19
src/Oauth2/Client/Provider.php
Executable file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace OAuth2\Client;
|
||||
|
||||
class Provider
|
||||
{
|
||||
private function __constuct() {}
|
||||
|
||||
public static function factory($name, array $options = null)
|
||||
{
|
||||
if ( ! class_exists($name)) {
|
||||
|
||||
throw new OAuth2\Client\Exception('There is no identity provider called: '.$name);
|
||||
|
||||
}
|
||||
|
||||
return new $name($options);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user