JWT(JSON Web Token) PHP 로그인 구현
·
Web/개발
JWT(JSON Web Token)란?JWT_class.phpsecretKey = "SSSCCCPPPAAANNNDDDYYYOOO"; } private function base64UrlEncode($data) { return str_replace(['+', '/', '='], ['-', '_', ''], base64_encode($data)); } public function hashing($payload) { $header = [ 'alg' => 'HS256', 'typ' => 'JWT' ]; $header = $this->base64UrlEncode(json_encode($header)); ..