Hello! I’m trying the WebSudo plugin, following the documentation here: https://github.com/ServiceStack/ServiceStack/wiki/Plugins#web-sudo
I’m having some problems because I think I don’t understand how it works; this is my situation:
The service:
[WebSudoRequired]
[Authenticate]
public class MyServices : Service
{
public object Any(Hello request)
{
return new HelloResponse { Result = "Hello!" };
}
}
[Route("/hello")]
public class Hello : IReturn<HelloResponse>
{
}
public class HelloResponse
{
public string Result { get; set; }
}
First I login:
GET on /auth/credentials?UserName=user&Password=user&format=json
So I try to access the service and I get the correct “402 Web Sudo Required”:
GET on /hello?format=json
Then… for what I can understand, I have to re-login, and so I re-send:
GET on /auth/credentials?UserName=user&Password=user&format=json
Now, if I try to access the service I get again the “402 Web Sudo Required” status…
Is there something I’m missing?