コード例 #1
0
        private object GetLoginBody(string loginId, string secret, AuthType authType)
        {
            object body = null;

            if (authType == AuthType.Organization || authType == AuthType.Application)
            {
                body = new ClientIdLoginPayload
                    {
                        ClientId = loginId,
                        ClientSecret = secret
                    };
            }
            else if (authType == AuthType.User)
            {
                body = new UserLoginPayload
                    {
                        UserName = loginId,
                        Password = secret
                    };
            }
            return body;
        }
コード例 #2
0
ファイル: Client.cs プロジェクト: kernicus/usergrid-.net-sdk
        private object GetLoginBody(string loginId, string secret, AuthType authType)
        {
            object body = null;

            if (authType == AuthType.ClientId || authType == AuthType.Application)
            {
                body = new ClientIdLoginPayload
                {
                    ClientId     = loginId,
                    ClientSecret = secret
                };
            }
            else if (authType == AuthType.User)
            {
                body = new UserLoginPayload
                {
                    UserName = loginId,
                    Password = secret
                };
            }
            return(body);
        }