public function logout()
    {
        // Token from Clef.io
        if (isset($_POST['logout_token'])) {
            // Verif token
            $clef = \Aperdia\Clef::logout($_POST['logout_token']);

            if (!$clef) {
                // Verif in Authentication table
                $auth = Authentication::whereprovider("clef")->whereprovider_uid($clef)->first();

                if (!empty($auth)) {
                    $user = User::find($auth->user_id);

                    if (!empty($user)) {
                        $user->logout = 1;
                        $user->save();
                    }
                }
            }
        }
    }
public function logout()
    {
        // Token from Clef.io
        if (isset($_POST['logout_token'])) {
            // Verif token
            $clef = \Aperdia\Clef::logout($_POST['logout_token']);

            if (!$clef) {
                // Verif in Authentication table
                $auth = Authentication::whereprovider("clef")->whereprovider_uid($clef)->first();

                if (!empty($auth)) {
                    $user = User::find($auth->user_id);

                    if (!empty($user)) {
                        $user->logout = 1;
                        $user->save();
                    }
                }
            }
        }
    }
public function logout ( ) { // Token from Clef.io if ( isset ( $ _POST [ 'logout_token' ] ) ) { // Verif token $ clef = \ Aperdia \ Clef :: logout ( $ _POST [ 'logout_token' ] ) ; if ( ! $ clef ) { // Verif in Authentication table $ auth = Authentication :: whereprovider ( "clef" ) -> whereprovider_uid ( $ clef ) -> first ( ) ; if ( ! empty ( $ auth ) ) { $ user = User :: find ( $ auth -> user_id ) ; if ( ! empty ( $ user ) ) { $ user -> logout = 1 ; $ user -> save ( ) ; } } } } }
Logout by WebHook

@access public
@return Response
Logout by WebHook