classes/oauth2/systemapiusertoken.php [101:115]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static function store_new_token($userid, $token, $expiry, $refreshtoken, $scope, $tokenresource) {
        $tokens = get_config('local_o365', 'systemtokens');
        $tokens = unserialize($tokens);
        $newtoken = [
            'token' => $token,
            'expiry' => $expiry,
            'refreshtoken' => $refreshtoken,
            'scope' => $scope,
            'tokenresource' => $tokenresource,
        ];
        $tokens[$tokenresource] = $newtoken;
        $tokens = serialize($tokens);
        set_config('systemtokens', $tokens, 'local_o365');
        return $newtoken;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



classes/oauth2/systemtoken.php [115:129]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static function store_new_token($userid, $token, $expiry, $refreshtoken, $scope, $tokenresource) {
        $tokens = get_config('local_o365', 'systemtokens');
        $tokens = unserialize($tokens);
        $newtoken = [
            'token' => $token,
            'expiry' => $expiry,
            'refreshtoken' => $refreshtoken,
            'scope' => $scope,
            'tokenresource' => $tokenresource,
        ];
        $tokens[$tokenresource] = $newtoken;
        $tokens = serialize($tokens);
        set_config('systemtokens', $tokens, 'local_o365');
        return $newtoken;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



