def METHOD_NAME(self, responseAsJsonObject, context):
    print "Inside modifyResponse method of introspection script ...."
    try:
        # Getting user-info-jwt
        ujwt = context.getHttpRequest().getParameter("ujwt")
        print ujwt
        if not ujwt:
            print "UJWT is empty or null"
            return True
        # Parse jwt
        userInfoJwt = Jwt.parse(ujwt)
        configObj = CdiUtil.bean(ConfigurationFactory)
        jwksObj = configObj.getWebKeysConfiguration()
        jwks = JSONObject(jwksObj)
        # Validate JWT
        authCryptoProvider = AuthCryptoProvider()
        validJwt = authCryptoProvider.verifySignature(userInfoJwt.getSigningInput(), userInfoJwt.getEncodedSignature(), userInfoJwt.getHeader().getKeyId(), jwks, None, userInfoJwt.getHeader().getSignatureAlgorithm())
        if validJwt == True:
            print "user-info jwt is valid"
            # Get claims from parsed JWT
            jwtClaims = userInfoJwt.getClaims()
            jansAdminUIRole = jwtClaims.getClaim("jansAdminUIRole")
            print "Role obtained from UJWT: " + jansAdminUIRole.getString(0)
            # fetch role-scope mapping from database
            scopes = None
            try:
                entryManager = CdiUtil.bean(PersistenceEntryManager)
                adminConf = AdminConf()
                adminUIConfig = entryManager.find(adminConf.getClass(), "ou=admin-ui,ou=configuration,o=jans")
                roleScopeMapping = adminUIConfig.getDynamic().getRolePermissionMapping()
                # roleScopeMapping = adminUIConfig.getDynamic()
                print roleScopeMapping
                for ele in roleScopeMapping:
                    if ele.getRole() == jansAdminUIRole.getString(0):
                        scopes = ele.getPermissions()
            except Exception as e:
                print "Error:  Failed to fetch/parse Admin UI roleScopeMapping from DB"
                print e
            print "Following scopes will be added in api token: {}".format(scopes)
        responseAsJsonObject.accumulate("scope", scopes)
    except Exception as e:
            print "Exception occured. Unable to resolve role/scope mapping."
            print e
    return Tru