Simple question, I've got the code below to specify the routes for my user authentication using a custom CredentialsAuthProvider (put together using what I found in the documentation)
// inside 'Configure()'....
Dictionary<Type, string[]> serviceRoutes = new Dictionary<Type, string[]>();
serviceRoutes.Add(typeof(AuthService), new[] { "/user/auth" });
AuthFeature authFeature = new AuthFeature(() => new AuthUserSession(), new IAuthProvider[] {
new myCompany.web.JSONService.myCompanyCredentialsAuthProvider()
});
authFeature.IncludeAssignRoleServices = false;
authFeature.ServiceRoutes = serviceRoutes; //specify manual auth routes
Plugins.Add(authFeature);
which creates a route of /user/auth, what I'd also like is a route like this :
/user/logout
but there is very little in the documentation about logout functionality. Is this a custom route I have to build into my service like all my other API calls, or is there a configuration option I can use?
Also, i'm currently using the swagger plugin to document and test my service, but it shows me the /user/auth
route as 'get' enabled, I'd like to restrict it to 'post' verb only, if that's possible? Secondary question, mostly want to know correct way to implement logout