which php files for jwt integration?
-
Good Morning!
I plan to add a modified JWT to my WordPress for cross domain user id verification. Part of the SDK codes are below. Does anyone know which php files in my theme folder can add those codes? I’m newbie in the WP development.
Thanks
iam<?php namespace sdk; class bJwt { const TYPE_RESERVED = 0; const TYPE_JSON = 1; const TYPE_SYS = 2; public static $enableLog = true; protected static $logger = null; public static $appName = ''; public static $issuerId = 0; public static $secretKey = ''; public static $aesKey = ''; public static function getJwt($body) { $body = json_encode($body, JSON_UNESCAPED_UNICODE); //JSON_UNESCAPED_UNICODE 必须 $header = self::packHeader(); $body = self::encrypt($body); $base64Header = base64_encode($header); $base64Payload = base64_encode($body); $base64Signature = base64_encode(self::sign($base64Header, $base64Payload)); return "{$base64Header}.{$base64Payload}.{$base64Signature}"; } protected static function packHeader() { $header = '';
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘which php files for jwt integration?’ is closed to new replies.