public HttpResponseMessage Auth(string uporabnikID) { AuthServiceClient authService = new AuthServiceClient(); DAuth dAuth = authService.GetSession(uporabnikID); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, dAuth); return(response); }
//Create new session and return session token public static DAuth CreateSession(string userNameOrRIFID) { DAuth auth = new DAuth() { SessionAuthToken = "invalid username in domain", IsUserValidInAD = false }; if (ValidateUserOrRIFID(userNameOrRIFID)) { auth.SessionAuthToken = GetNewSessionToken(userNameOrRIFID); auth.IsUserValidInAD = true; } ; return(auth); }