New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logout action cannot be called without the ultimate parameter #295

Closed
tusmester opened this Issue Feb 27, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@tusmester
Member

tusmester commented Feb 27, 2018

After the addition of the ultimate logout feature there is an optional parameter called ultimateLogout on the Logout OData action (LogoutAction class). Except it is not truly optional now - if you omit it, you receive an InvalidCastException.

The reason is we do not handle this correctly in the Execute method of the LogoutAction class. In the beginning of the method we should handle if the parameter is Type.Missing instead of null or a bool value.

This should work, without the parameter:

$.ajax({
     url: "/Odata.svc/('Root')/Logout",
     dataType: "json",
     type: 'POST',
     success: function () {
         console.log('Success!')
     }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment