Code Duplication    Length = 8-8 lines in 2 locations

htdocs/xoops_lib/Xmf/Jwt/TokenReader.php 2 locations

@@ 53-60 (lines=8) @@
50
     *
51
     * @return object|false payload as stdClass, or false if token was invalid
52
     */
53
    public static function fromCookie($keyName, $cookieName, $assertClaims = array())
54
    {
55
        $token = Request::getString($cookieName, '', 'COOKIE');
56
        if (empty($token)) {
57
            return false;
58
        }
59
        return static::fromString($keyName, $token, $assertClaims);
60
    }
61
62
    /**
63
     * Validate and decode a JSON Web Token string from a request (i.e. POST body)
@@ 71-78 (lines=8) @@
68
     *
69
     * @return object|false payload as stdClass, or false if token was invalid
70
     */
71
    public static function fromRequest($keyName, $attributeName, $assertClaims = array())
72
    {
73
        $token = Request::getString($attributeName, '');
74
        if (empty($token)) {
75
            return false;
76
        }
77
        return static::fromString($keyName, $token, $assertClaims);
78
    }
79
80
    /**
81
     * Validate and decode a JSON Web Token string from a header