]> _ Git - cubist_socialite.git/commitdiff
wip #4765 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 7 Oct 2021 18:11:16 +0000 (20:11 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 7 Oct 2021 18:11:16 +0000 (20:11 +0200)
.idea/cubist_socialite.iml
composer.json
composer.lock
src/User.php [deleted file]

index 380d96fc3fad06c463ead80278929e3b17b1ee4d..a5ce003b5e46bfce286de4b8be4a0afde0ad2ed1 100644 (file)
@@ -75,6 +75,7 @@
       <excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-client" />
       <excludeFolder url="file://$MODULE_DIR$/vendor/psr/container" />
       <excludeFolder url="file://$MODULE_DIR$/vendor/spatie/laravel-permission" />
+      <excludeFolder url="file://$MODULE_DIR$/vendor/mpyw/null-auth" />
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
index e158556b4adbcddcc345f6677565c04b65aac8cc..bf7de39613398ee92cb5de5420dbecefd639ab72 100644 (file)
@@ -24,7 +24,8 @@
     "laravel/framework": "~5.8|^6.0|^7.0|^8.0",
     "laravel/socialite": "^v5.2.5",
     "socialiteproviders/google": "^4.1.0",
-    "spatie/laravel-permission": "^4.0"
+    "spatie/laravel-permission": "^4.0",
+    "mpyw/null-auth": "^2.0"
   },
   "repositories": [
     {
index f13290589c4f299a1b54aec5c5df8377131e88ec..912a608b184444c68640c7094d49085a1b21f4c9 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "185c9aad8ba67b778a1458bca411cbdf",
+    "content-hash": "b5627ef75c3d7f5c85d299dda6125fff",
     "packages": [
         {
             "name": "brick/math",
             ],
             "time": "2021-10-01T21:08:31+00:00"
         },
+        {
+            "name": "mpyw/null-auth",
+            "version": "v2.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/mpyw/null-auth.git",
+                "reference": "4cfe09067629b8856fc34f82418cb116acd42019"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/mpyw/null-auth/zipball/4cfe09067629b8856fc34f82418cb116acd42019",
+                "reference": "4cfe09067629b8856fc34f82418cb116acd42019",
+                "shasum": ""
+            },
+            "require": {
+                "illuminate/auth": "^6.0 || ^7.0 || ^8.0 || ^9.0",
+                "illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0",
+                "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0",
+                "php": "^7.3 || ^8.0"
+            },
+            "require-dev": {
+                "friendsofphp/php-cs-fixer": "^2.14",
+                "mockery/mockery": "^1.3",
+                "orchestra/testbench": "^6.0",
+                "php-coveralls/php-coveralls": "^2.1"
+            },
+            "type": "library",
+            "extra": {
+                "laravel": {
+                    "providers": [
+                        "Mpyw\\NullAuth\\NullAuthServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Mpyw\\NullAuth\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "mpyw",
+                    "email": "ryosuke_i_628@yahoo.co.jp"
+                }
+            ],
+            "description": "Null Guard for Laravel. Designed for Middleware-based authentication and testing.",
+            "keywords": [
+                "Dummy",
+                "auth",
+                "illuminate",
+                "laravel",
+                "none",
+                "nothing",
+                "null"
+            ],
+            "support": {
+                "issues": "https://github.com/mpyw/null-auth/issues",
+                "source": "https://github.com/mpyw/null-auth/tree/v2.0.0"
+            },
+            "time": "2021-01-25T08:58:33+00:00"
+        },
         {
             "name": "nesbot/carbon",
             "version": "2.53.1",
diff --git a/src/User.php b/src/User.php
deleted file mode 100644 (file)
index 119b5a8..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-
-namespace Cubist\Socialite;
-
-use Illuminate\Auth\Authenticatable;
-use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
-use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
-use Illuminate\Foundation\Auth\Access\Authorizable;
-use Illuminate\Notifications\Notifiable;
-use Spatie\Permission\Traits\HasRoles;
-
-class User implements
-    AuthenticatableContract,
-    AuthorizableContract
-{
-    use Authenticatable, Authorizable;
-    use Notifiable;
-    use HasRoles;
-
-    protected $provider;
-
-    protected $name;
-    protected $email;
-    protected $avatar;
-    protected $id;
-    protected $nickname;
-    protected $remember_token;
-    protected $password;
-
-    /**
-     * @var \Laravel\Socialite\Contracts\User
-     */
-    protected $socialiteUser;
-
-    public function __construct($socialiteUser)
-    {
-        $this->socialiteUser = $socialiteUser;
-        $this->id = $this->socialiteUser->getId();
-        $this->name = $this->socialiteUser->getName();
-        $this->nickname = $this->socialiteUser->getNickname();
-        $this->email = $this->socialiteUser->getEmail();
-        $this->avatar = $this->socialiteUser->getAvatar();
-    }
-
-    /**
-     * @return mixed
-     */
-    public function getName()
-    {
-        return $this->socialiteUser->getName();
-    }
-
-    /**
-     * @return mixed
-     */
-    public function getAvatar()
-    {
-        return $this->socialiteUser->getAvatar();
-    }
-
-    /**
-     * @return mixed
-     */
-    public function getEmail()
-    {
-        return $this->socialiteUser->getEmail();
-    }
-
-    /**
-     * @return mixed
-     */
-    public function getNickname()
-    {
-        return $this->socialiteUser->getNickname();
-    }
-
-    /**
-     * @return mixed
-     */
-    public function getId()
-    {
-        return $this->socialiteUser->getId();
-    }
-
-    public function getKeyName()
-    {
-        return 'id';
-    }
-
-}
\ No newline at end of file