コード例 #1
0
        public AuthenticationProperties ValidateUser(OAuthGrantResourceOwnerCredentialsContext context)
        {
            try
            {
                IHelperBase helperApp = null;
                if (_audience.Name == FiiveApps.SportsPlayUserMobile.ToString() ||
                    _audience.Name == FiiveApps.SportsPlayCoachMobile.ToString() ||
                    _audience.Name == FiiveApps.SportsPlayCoachWeb.ToString())
                {
                    helperApp = new SportsPlayHelper();

                    helperApp.ClientId     = context.ClientId;
                    helperApp.UserName     = context.UserName;
                    helperApp.Password     = context.Password;
                    helperApp.AudienceName = _audience.Name;

                    AuthenticationProperties props = helperApp.ValidateUser();
                    return(props);
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception) { return(null); }
        }
コード例 #2
0
 public NullReservation()
 {
     _bookingDto   = new BookingViewObject();
     _isValid      = false;
     _bookingItems = new List <BookingItemsViewObject>();
     _base         = new HelperBase();
     _contracts    = new ObservableCollection <ContractSummaryDto>();
     _clients      = new ObservableCollection <ClientSummaryExtended>();
     _drivers      = new ObservableCollection <ClientSummaryExtended>();
 }