Coder Social home page Coder Social logo

hospital-his's Introduction

Hospital

Introduction

Small example using Xamarin Forms 2.5, MVC5 and web api.

Login in Xamarin Forms 2.5 with our API. Get, create, delete and update (CRUD) records from Xamarin Forms from our API. All queries from Xamarin Forms are made with token.

License:MIT

Usage

Update your connectionStrings

Configure a connection string for SQL Server in the Web.config

  <connectionStrings>
    <add name="DefaultConnection" connectionString="Data 
    Source=YOURTDATABASE; 
    Initial Catalog=YOURNAMEDB; Persist Security     
    Info=True;User ID=YOURUSER;Password=YOURPASSWORD”"
    providerName="System.Data.SqlClient" />
  </connectionStrings>-->

Configure validation logic for passwords

By default, if you don't customise anything, Identity configures a default set of validation rules for new passwords. If you want to change these values, you can change the file called App_Start/IdentityConfig.cs

    manager.PasswordValidator = new PasswordValidator
    {
        RequiredLength = 6, // Passwords must be at least 6 characters
        RequireNonLetterOrDigit = false, // Passwords must have at least one digit ('0'-'9')
        RequireDigit = false, // Passwords must have at least one non alphanumeric character
        RequireLowercase = false, // // Passwords must have at least one lowercase ('a'-'z')
        RequireUppercase = false, // Passwords must have at least one uppercase ('A'-'Z')
    };

PasswordValidator Class

Set the color in the project

In our PCL, the file App.xaml you can change the color

    <Color x:Key="MainColor">#273646</Color>
    <Color x:Key="FontColor">#2d8dd6</Color>
    <Color x:Key="AccentColor1">#2371aa</Color>
    <Color x:Key="AccentColor2">#e44235</Color>
    <Color x:Key="BackgroundColor">#e9eeef</Color>

Resource Dictionaries

Set your API

In our PCL, the file Services/HttpService.cs you must put the url of your api and prefix

   private const string UrlApi = "YOURAPI";
   private const string tokenType = "bearer";
   protected const string FirstVersion = "/api";

Check your API with postam

Security

OAuth 2.0 protocol and Microsoft Owin Library will help us. Owin is basically creating own pipeline between iis and application to manage requests.

In the file Startup.Auth.cs an OWIN Authorization server is configured to accept login (token) HTTP requests at /Token endpoint and external login requests at /api/Account/ExternalLogin

Plugins

Web API and MVC5

Plugin Project
EntityFramework Model
Newtonsoft Model

Xamarin

Plugin Author
Settings james montemagno
MvvmLightLibsStd10 galasoft
Connectivity james montemagno
Newtonsoft james Newton-King
Image Circle james montemagno

Tools

The following tools are essential:

Recommended links

Getting Started with ASP.NET MVC 5

License

The MIT License (MIT) see License file

hospital-his's People

Watchers

James Cloos avatar tazz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.