if (this.grantType !== GrantType.AuthorizationCode) {
                throw new Error("Grant Type is " + this.grantType + " when it should be " + GrantType.AuthorizationCode);
            }