Incorrect error in Auth.JWTUtil OST

Issue #2552 resolved
Jason Clark created an issue

The newly added Auth.JWTUtil support appears to be partially incorrect; I’m getting a “Non-static method cannot be referenced from a static context” error while using Auth.JWTUtil.validateWithKey(), which is documented as static, and which does compile without issue.

Comments (2)

  1. Scott Wells repo owner
    • changed status to open

    Thanks for reporting. Just an unfortunate oversight when stubbing the missing Auth namespace types. I've just committed a fix for the next build that results in the following:

    // Generated by Illuminated Cloud on Tue Apr 16 12:10:12 CDT 2024. Do not edit.
    
    global class /*Auth.*/JWTUtil 
    {
        global static Auth.JWT parseJWTFromStringWithoutValidation(String incomingJWT)
        {
        }
    
        global static Auth.JWT validateJWTWithCert(String incomingJWT, String certDeveloperName)
        {
        }
    
        global static Auth.JWT validateJWTWithKey(String incomingJWT, String publicKey)
        {
        }
    
        global static Auth.JWT validateJWTWithKeysEndpoint(String incomingJWT, String keysEndpoint, Boolean shouldUseCache)
        {
        }
    }
    

  2. Log in to comment