示例#1
0
        public object Any(HelloAuth request)
        {
            var response = new HelloResponse {
                Result = "Hello, " + request.Name
            };

            return(response);
        }
示例#2
0
        public object Any(HelloAuth request)

        {
            Debug.Write(HttpContext.Current.User.Identity.Name);
            var x = new HelloResponse { Result = "Hello, {0}!".Fmt(request.Name) };
            var identity = (ClaimsIdentity)HttpContext.Current.User.Identity;
            var claims = identity.Claims;

            x.Claims = new List<string>();
            foreach (var claim in claims)
            {
                x.Claims.Add(claim.Type+" : "+claim.Value);
            }
            return x;
        }
示例#3
0
        public object Any(HelloAuth request)

        {
            Debug.Write(HttpContext.Current.User.Identity.Name);
            var x = new HelloResponse {
                Result = "Hello, {0}!".Fmt(request.Name)
            };
            var identity = (ClaimsIdentity)HttpContext.Current.User.Identity;
            var claims   = identity.Claims;

            x.Claims = new List <string>();
            foreach (var claim in claims)
            {
                x.Claims.Add(claim.Type + " : " + claim.Value);
            }
            return(x);
        }
示例#4
0
 public object Any(HelloAuth request)
 {
     return(new HelloResponse {
         Result = "Hello, " + request.Name
     });
 }
示例#5
0
 public object Any(HelloAuth request)
 {
     var response = new HelloResponse { Result = "Hello, " + request.Name };
     return response;
 }