Ejemplo n.º 1
0
        public static AuthRequest Create(Token token, Trust trust)
        {
            Scope scope = null;

            if (trust != null)
            {
                scope = new Scope()
                {
                    Trust = trust,
                };
            }

            return new AuthRequest()
            {
                Auth = new Auth()
                {
                    Identity = new Identity()
                    {
                        Methods = new[] { "token" },
                        Token = token
                    },
                    Scope = scope
                }
            };
        }
Ejemplo n.º 2
0
 public static TrustRequest Create(Trust trust)
 {
     return new TrustRequest()
     {
         Trust = trust
     };
 }
Ejemplo n.º 3
0
 public static RestMessage<AuthRequest> CreateMessage(Token token, Trust trust)
 {
     return new RestMessage<AuthRequest>(Create(token, trust));
 }
Ejemplo n.º 4
0
 public static RestMessage<TrustRequest> CreateMessage(Trust trust)
 {
     return new RestMessage<TrustRequest>(Create(trust));
 }