Coder Social home page Coder Social logo

micflow-android's Introduction

MICFlow-Android

This application showcases using the Mobile Identity Connect (MIC) authorization-grant login flow from Kinvey's client libraries.

Mobile Identity Connect is a service that bridges mobile applications with existing enterprise identity and single sign-on solutions. MIC enables mobile applications to integrate with a variety of identity solutions using a single OAuth2-based interface. This allows enterprise application developers to avoid the complexity of integrating these protocols into mobile, while providing enterprise IT the means to ensure that access to resources is secured only to authenticated users, as well as maintaining full control over a mobile user's identity.

##Set up

  1. Clone the Repo, or download the zip file and extract it.
  2. Download the latest Kinvey library (zip) and extract the downloaded zip file, from: http://devcenter.kinvey.com/android/downloads

###Console

  1. Visit the User Section of the console.
  2. Click the Auth Source tab at the top of the page
  3. Set the Type of Provider to be Custom
  4. In the Provider URL, enter: https://authlinkdemo.herokuapp.com/authenticate
  5. In the Redirect URI's: enter: kinveyAuthDemo://

The above Auth Provider sample can be used with the username: test and the password: test.

###Android Studio

  1. In Android Studio, go to File โ†’ New โ†’ Import Project
  2. Browse to the extracted zip from step 1, and click OK
  3. Click Next and Finish.
  4. Copy all jars in the libs/ folder of the Kinvey Android library zip to the lib/ folder at the root of the project
  5. Click the play button to start a build, if you still see compilation errors ensure the versions are correctly defined in the dependencies list

###Finally, for all IDEs

Specify your app key and secret in MainActivity constant variables APP_KEY and APP_SECRET. Specify your redirect URI in redirectURI, and the username and password you want to use for the automated flow.

public class MainActivity extends ActionBarActivity {

    private Client kinveyClient;
	private static final String APP_KEY = "APP_KEY";
	private static final String APP_SECRET = "APP_SECRET";
	private static final String redirectURI = "REDIRECT_URI";

	private static final String USERNAME = "USERNAME";
	private static final String PASSWORD = "PASSWORD";

In your AndroidManifest.xml, specify your redirect URI in all lowercase letters without the trailing characters-- for example, "MyRedirect://" would be entered as "myredirect"

   	<data android:scheme="RedirectURI" />  

Take a look at our MIC Guide for more information.

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.