diff --git a/app/library/OAuth/UserData/Github.php b/app/library/OAuth/UserData/Github.php new file mode 100644 index 0000000..d8b4d13 --- /dev/null +++ b/app/library/OAuth/UserData/Github.php @@ -0,0 +1,56 @@ +data = $data; + } + + /** + * {@inheritDoc} + */ + public function getProvider() + { + return 'Github'; + } + + /** + * {@inheritDoc} + */ + public function getId() + { + return (int) $this->data['id']; + } + + /** + * {@inheritDoc} + */ + public function getUsername() + { + return $this->data['login']; + } + + /** + * {@inheritDoc} + */ + public function getName() + { + return $this->data['name']; + } + + /** + * {@inheritDoc} + */ + public function getEmail() + { + return $this->data['email']; + } +} diff --git a/app/library/OAuth/UserData/UserDataInterface.php b/app/library/OAuth/UserData/UserDataInterface.php new file mode 100644 index 0000000..cf489a3 --- /dev/null +++ b/app/library/OAuth/UserData/UserDataInterface.php @@ -0,0 +1,43 @@ +