Exemplo n.º 1
0
        public override AuthorizationCode Authorize()
        {
            base.Authorize();

            var result = OAuthService.ValidateThirdToken(AccessToken, MappingType, PlatCode, Browser, IpAddress, ExtendField);

            if (result.Code != 0)
            {
                OAuthError(result.Code.ToString(), result.Message, 400);
            }

            return(OAuthService.CreateAuthorizationCode(ClientId, result.UserId));
        }
Exemplo n.º 2
0
        public override AuthorizationCode Authorize()
        {
            base.Authorize();

            var result = OAuthService.ValidatePassword(UserName, Password, PlatCode, Browser, IpAddress, ExtendField);

            if (result.Code != 0)
            {
                OAuthError(result.Code.ToString(), result.Message, 400);
            }

            return(OAuthService.CreateAuthorizationCode(ClientId, result.UserId));
        }