public AuthenticationPageViewModel(INavigationService navigationService, IPermissionService permissionService, IStringLocalizer <AuthenticationPageViewModel> localizer, IApiAuthentication apiAuthentication, INotificationService notificationService) : base(navigationService, permissionService, localizer) { NavigationService = navigationService; ApiAuthentication = apiAuthentication; NotificationService = notificationService; ApiAuthentication.Authenticated += (sender, args) => { Device.BeginInvokeOnMainThread(async() => { await NavigationService.GoBackAsync(); // TODO: LocalizationService NotificationService.Notify("Login successful"); }); }; // TODO: LocalizationService Title = "Login"; AuthenticateWithGeoWikiCommand = new DelegateCommand(() => { ApiAuthentication.AuthenticateWithGeoWiki(); }); AuthenticateWithGoogleCommand = new DelegateCommand(() => { ApiAuthentication.AuthenticateWithGoogle(); }); AuthenticateWithFacebookCommand = new DelegateCommand(() => { ApiAuthentication.AuthenticateWithFacebook(); }); }
public GamesController(IApiAuthentication authentication, IGameService gameService, IGenreService genreService, IPublisherService publisherService, IPlatformTypeService platformTypeService, IMapper mapper) : base(authentication) { _gameService = gameService; _genreService = genreService; _publisherService = publisherService; _platformTypeService = platformTypeService; _mapper = mapper; }
public MainPageViewModel(INavigationService navigationService, IPermissionService permissionService, IStringLocalizer <MainPageViewModel> localizer, IApiAuthentication apiAuthentication, IAppDataService appDataService, IMapper mapper) : base(navigationService, permissionService, localizer) { ApiAuthentication = apiAuthentication; AppDataService = appDataService; Mapper = mapper; Title = Localizer[nameof(Title)]; Instruction = Localizer[nameof(Instruction)]; }
public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options) { // Convert NSUrl to Uri Uri uri = new Uri(url.AbsoluteString); // Load redirectUrl page IApiAuthentication apiAuthentication = ((PrismApplicationBase)Xamarin.Forms.Application.Current).Container.Resolve <IApiAuthentication>(); apiAuthentication.Authenticator.OnPageLoading(uri); return(true); }
public DefaultController( IApiSearch apiSearch, IApiRules apiRules, IApiSetup apiSetup, IApiAuthentication apiAuthentication, IApiAthlete apiAthlete, IApiReports apiReports, IApiStartingList apiStartingList, IApiExport apiExport) { this.apiSearch = apiSearch; this.apiRules = apiRules; this.apiSetup = apiSetup; this.apiAuthentication = apiAuthentication; this.apiAthlete = apiAthlete; this.apiReports = apiReports; this.apiStartingList = apiStartingList; this.apiExport = apiExport; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Convert Android.Net.Url to Uri Uri uri = new Uri(Intent.Data.ToString()); // Load redirectUrl page IApiAuthentication apiAuthentication = ((PrismApplicationBase)Xamarin.Forms.Application.Current).Container.Resolve <IApiAuthentication>(); apiAuthentication.Authenticator.OnPageLoading(uri); Intent intent = new Intent(this, typeof(MainActivity)); intent.SetFlags(ActivityFlags.ClearTop | ActivityFlags.SingleTop); StartActivity(intent); Finish(); }
protected override bool IsAuthorized(HttpActionContext actionContext) { _authentication = DependencyResolver.Current.GetService <IApiAuthentication>(); IEnumerable <string> tokens; actionContext.Request.Headers.TryGetValues(TokenName, out tokens); var token = tokens?.First(); if (token == null) { return(false); } var user = _authentication.GetUserByToken(token); if (_mode == AuthorizationMode.Allow) { return(user != null && _roles.Any(x => user.IsInRole(x.ToString()))); } return(user != null && !_roles.Any(x => user.IsInRole(x.ToString()))); }
public CommentsController(IApiAuthentication authentication, ICommentService commentService, IMapper mapper) : base(authentication) { _commentService = commentService; _mapper = mapper; }
public GenresController(IApiAuthentication authentication, IGenreService genreService, IMapper mapper) : base(authentication) { _genreService = genreService; _mapper = mapper; }
public BaseController(IApiAuthentication authentication) { _authentication = authentication; }
public PublishersController(IApiAuthentication authentication, IPublisherService publisherService, IMapper mapper) : base(authentication) { _publisherService = publisherService; _mapper = mapper; }
public UserFunctions(UserRepositoryFactory userRepoFactory, IApiAuthentication apiAuthentication) { _repoFactory = userRepoFactory; _apiAuthentication = apiAuthentication; }
public HazardInfoApi(IApiAuthentication apiAuthentication) : base(apiAuthentication) { }
protected BaseFunction(IApiAuthentication apiAuthentication) { ApiAuthentication = apiAuthentication; }
public BaseKitsApi(IApiAuthentication apiAuthentication) { _apiAuthentication = apiAuthentication; }
protected HazardApiBase(IApiAuthentication apiAuthentication) { _apiAuthentication = apiAuthentication; }
public EmergencyKitsApi(IApiAuthentication apiAuthentication) { _apiAuthentication = apiAuthentication; }
public PhotoFunction(IApiAuthentication apiAuthentication) : base(apiAuthentication) { }
public ApplicationFunctions(ApplicationRepositoryFactory appRepoFactory, IApiAuthentication apiAuthentication) { //_repoFactory = userRepoFactory; _appRepoFactory = appRepoFactory; _apiAuthentication = apiAuthentication; }
public FamilyPlansApi(IApiAuthentication apiAuthentication) : base(apiAuthentication) { }
public ApiClient(IApiAuthentication apiAuthentication) { ApiAuthentication = apiAuthentication; }
public AppDataService(IApiAuthentication apiAuthentication, IAppDataContext context) { ApiAuthentication = apiAuthentication; Context = context; }
public FamilyPlansApi(IApiAuthentication apiAuthentication) { _apiAuthentication = apiAuthentication; }
public Account(IApiAuthentication auth) { _auth = auth; }
public OrdersController(IApiAuthentication authentication, IOrderService orderService, IMapper mapper) : base(authentication) { _orderService = orderService; _mapper = mapper; }
public OrganizationFunctions(IOrganizationRepository repo, UserRepositoryFactory repoFactory, IApiAuthentication apiAuthentication) { _repo = repo; _userRepoFactory = repoFactory; _apiAuthentication = apiAuthentication; }
public HazardHuntsApi(IApiAuthentication apiAuthentication) : base(apiAuthentication) { }