Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SERVER ROUTE
- [HttpGet("server/status")]
- public ServerStatus GetServerStatus([FromBody]MasterUserCredentials credentials)
- {
- // Check for master user
- if(MasterUserCredentials.CheckCredentialsOf(credentials)) // Static class that compares the credentials provided with the correct credentials for a master user and check his role
- {
- return ServerStatus.Good;
- }
- }
- WPF APPLICATION THAT CAN USE ANYBODY
- // Get server status
- var status = WebUtilities.GetAsync<ServerStatus>("localhost:5000/server/status",
- new MasterUserCredentials { Username = "THIS SHOULD NOT BE HERE", Password = "ALSO THIS SHOULD NOT BE HERE" });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement