THE API AN INTRODUCTION TO THE MINISTRYPLATFORM APPLICATION PROGRAMMING INTERFACE STEPHEN WAREHAM.

Slides:



Advertisements
Similar presentations
The How of OAuth OAuth Hackathon – Six Apart
Advertisements

22 May 2008IVOA Trieste: Grid & Web Services1 Alternate security mechanisms Matthew J. Graham (Caltech, NVO) T HE US N ATIONAL V IRTUAL O BSERVATORY.
Attie Naude 14 May 2013 Windows Azure Mobile Services.
OAuth 2.0 By “PJ” (JP on meetup.com) iOS and PHP developer, and occasional lawyer Contact me via:
SFDC Integration Basics Gerry Winning. Integrating Your Progress App with SFDC Ovid Back Office App is Fully Integrated with SFDC (about two and a half.
Forms Authentication, Users, Roles, Membership Ventsislav Popov Crossroad Ltd.
The Alfresco API Steven Glover Gethin James Peter Monks.
National Center for Supercomputing Applications University of Illinois at Urbana-Champaign This material is based upon work supported by the National Science.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
OmStore Cloud API Harshit Agarwal Sohil Habib. About Us ●We are graduate students at CMU ●Currently at CMU Silicon Valley campus ●Working part time with.
Fraser Technical Solutions, LLC
Sql Server Advanced Features MIS 424 Professor Sandvig.
OAuth 2.0 in Depth By Rohit Ghatol SynerzipSynerzip Passionate about TechNextTechNext.
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control Maarten
BUILDING A FACEBOOK APP. STEP 1 Create a Developers License. Make sure to take note/record the app id/key.
Forms Authentication, Users, Roles, Membership Svetlin Nakov Telerik Corporation
Enticy GROUP THE A Framework for Web and WinForms (Client-Server) Applications “Enterprise Software Architecture”
Wyatt Pearsall November  HyperText Transfer Protocol.
Creating Databases for Web Applications cookie examples lab time: favorites cookies & Sessions class time for group work/questions on projects Next class:
Leveraging ArcGIS Online Elevation and Hydrology Services
Feedback #2 (under assignments) Lecture Code:
Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,
Introduction to the SharePoint 2013 REST API. 2 About Me SharePoint Solutions Architect at Sparkhound in Baton Rouge
Instructions You must bring your own laptop, your presentation and a power supply Technical staff is present in all to assist with network, audio and video.
Windows Role-Based Access Control Longhorn Update
API Crash Course CWU Startup Club. OUTLINE What is an API? Why are API’s useful? What is HTTP? JSON? XML? What is a RESTful API? How do we consume an.
Dean Anderson Polk County, Oregon GIS in Action 2014 Modifying Open Source Software (A Case Study)
1 ADO.NET Data Services Mike Taulty Developer & Platform Group Microsoft Ltd
ICM – API Server & Forms Gary Ratcliffe.
RESTful Web Services What is RESTful?
Securing Angular Apps Brian Noyes
Esri UC 2014 | Demo Theater | Using ArcGIS Online App Logins in Node.js James Tedrick.
Agenda Pattern Authenticate a user against UCWA Operations happen using the user’s identity Interact with the UCWA service endpoint Make HTTP requests.
Oracle 11g: SQL Chapter 7 User Creation and Management.
ASSIGNMENT 2 Salim Malakouti. Ticketing Website  User submits tickets  Admins answer tickets or take appropriate actions.
API Auth By Kyle Bradley. Role Definitions  User (Resource Owner)  The resource owner is the person who is giving access to some portion of their account.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Secure Mobile Development with NetIQ Access Manager
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
Introduction to Terra Dotta Applications Integration with Campus Data Systems for institutions beginning their software implementation.
#SummitNow Consuming OAuth Services in Alfresco Share Alfresco Summit 2013 Will Abson
Azure Active Directory is becoming one of, if not the, primary user identity management services for cloud applications. One of Azure Active Directory's.
Redmond Protocols Plugfest 2016 Andrew Davidoff Mail, Calendar, and Contacts Graph API Demonstration Senior Software Engineer.
Developers Introduction to the Power BI Platform.
Administrating a Database
4/18/2018 1:15 PM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
CollegeSource Security Application &
API (Application Program Interface)
RESTful Sevices Distributed Objects Presented by: Shivank Malik
Node.js Express Web Applications
API Security Auditing Be Aware,Be Safe
Data Virtualization Tutorial… CORS and CIS
Cosc 5/4730 REST services.
Node.js Express Web Services
An introduction to REST for SharePoint 2013
What is REST API ? A REST (Representational State Transfer) Server simply provides access to resources and the REST client accesses and presents the.
All about social networking
Dominik Pinter, CMS.IO, Authentication Dominik Pinter,
Ben Burbridge, Rebecca Jones, Hilary Newman Product Development
WEB API.
Principles of report writing
BY: SHIVI AGRAWAL ( ) CSE-(6)C
Agenda OAuth Concepts Programming OAuth.
$, $$, $$$ API testing Edition
TechEd /22/2019 9:22 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Administrating a Database
Western Mass Microsoft Technology Users Group
Informer 5 API How to get connected and start integrating
Computer Network Information Center, Chinese Academy of Sciences
D Guidance 26-Jun: Would like to see a refresh of this title slide
Presentation transcript:

THE API AN INTRODUCTION TO THE MINISTRYPLATFORM APPLICATION PROGRAMMING INTERFACE STEPHEN WAREHAM

WHAT DO YOU WANT TO DO? Build new/improved/customized features Build against extended/customized database Create brand new software applications What do YOU want to build using the API?

CUTTING THROUGH THE C.R.U.D C reate new records R ead data from the database U pdate existing database records D elete database records

ADDITIONAL API FEATURES Authenticate End Users Attach Files to Records

WHY USE THE API? The data access layer is built for you Data auditing is taken care of for you Workflow processes are invoked for you You “break the warranty” if you don’t! It’s fun and easy to do! No excuses!

WE HAVE 3 4 API S (TODAY) SOAP API: /ministryplatformapi/Api.svc Platform Service API: /ministryplatformapi/PlatformService.svc Data Service (ODATA) API: /ministryplatformapi/DataService.svc REST API (new!): /ministryplatformapi/ X …BUT WE’RE ABOUT TO HAVE 3 AGAIN

…HAS BEEN DEPRECATED!!! Create – AddRecord() Read – ExecuteStoredProcedure(), requires existing stored procedure Update – UpdateRecord() Delete – ExecuteStoredProcedure(), requires existing stored procedure X SOAP SCUM… ER, UM… CRUD…

…BUT DON’T WORRY We will still be supporting the SOAP API We will not remove the SOAP API anytime soon

PLATFORM SERVICE API Mirrors the “internal” API used by MinistryPlatform Uses OAuth for authentication Proprietary and often unconventional Steep learning curve

DATA SERVICE (ODATA) API Conforms to standard Open Data Specification ( Uses OAuth for authentication REST-ful interface (HTTP verbs, URL-based resources) Exposes entire database for better or worse

A SHINY, NEW, RESTFUL API!! Rest-ful syntax and HTTP verbs Secured access to the database Simple query mechanism Standard, easy to consume results OAuth for authentication

QUESTIONS? Next session: API Authentication and Authorization

AUTHENTICATION VS AUTHORIZATION Authentication validates a User Name and Password Typically results in TRUE or FALSE Authorization lets a user know what a user is allowed to do Typically results in a list of Roles or Rules Pertains to Nouns & Verbs: i.e. What do you see?, What can you do?

LEGACY SOAP API AUTHENTICATION Used GUID + API Password Must be passed as parameters with each request Must be stored securely by the Client Application One API User per Domain Full rights everywhere (or almost everywhere) Developers hold the “keys to the kingdom” But, don’t they anyway? Typically need database access to create stored procedures for all read operations

INTRODUCING OAUTH Open Authorization A standards-based authorization protocol Used by many major vendors (Facebook, Google, Twitter, …) More Info:

SECURITY TOKEN SERVICE/SERVER (STS) Has (or has access to) a user model Will authenticate a user and provide an Access Token The access token received is user-specific and temporary/time-limited Clients (software applications) utilize STS providers “Login to this App using your Facebook, Google, etc account” Eliminates the need for another user model MinistryPlatform is an STS consumer and provider!

GENERAL USE 1. User chooses to login using STS provider 2. User is redirected to provider’s login page 3. STS provider authenticates user 4. User is redirected back to original application along with an Access Token 5. Access Token is passed in Authorization Header of each subsequent request in order to gain access to Resources

OAUTH AND MINISTRYPLATFORM Use your Facebook account to log into MinistryPlatform Theoretically possible to log into Facebook using your MinistryPlatform account All 3 new APIs utilize OAuth for authentication/authorization

DEMO : CORE TOOLS & BATCH MANAGER Both use Client Credentials Authorization utilizes existing security roles, but is managed by the client application

USER INTERFACE = AUTHORIZATION 99% of the time you should use Client Credentials Use existing, empty roles for yes/no authorization Use end user’s credentials when building tools that make the user’s job easier They COULD do everything in MinistryPlatform (they have rights) They need a tool to give them a consolidated user interface to reduce the number of steps involved ?

QUESTIONS? Next Session: OAuth Flows

4 OAUTH FLOWS (STEPHEN’S DEFINITIONS) Implicit Grant – Used on the REST API test page, allows access from JavaScript Authorization Code Flow – Redirect to login page from server-side code Resource Owner Flow – User credentials are known/collected by the client application (no redirect) Client Credentials Flow – Uses credentials associated with the client application registered with the STS provider (MinistyPlatform)

IMPLICIT GRANT Can allow application to be developed entirely in client-side JavaScript Assumes end user has significant rights within MinistryPlatform Access Token belongs to the end user

AUTHORIZATION CODE Similar in end-user experience to Implicit Grant Redirects user to authorization server

RESOURCE OWNER Assumes your client application has (or can collect) the end user’s credentials Could be used like Client Credentials if you have a safe place for your application to store the user name and password (not recommended)

CLIENT CREDENTIALS (MY FAVORITE ) Allows client application to have access without storing a user name or password anywhere Can be used to provide data to an end user whether they are logged-in or not Best choice for 99% of your application development Client-specific user assignment is coming soon!

QUESTIONS? Reference with pretty diagrams : s.html s.html Next Session: REST API Overview

OFFICIAL NEW REST API (WOO HOO!) Available at root of API URL (e.g. /ministryplatformapi/) Has a built-in test page Utilizes Implicit Grant OAuth flow for test page DEMO: Login

GET Review endpoints to know what access your user has: /tables – Almost database tables (must have a Page record) /procs – API-specific Stored Procedures Demo: Do some getting!

POST Used to create records Can create an array of records in a single call Can create parent/dependent records in a single call Demo: Do some posting!

PUT Used to edit/update existing record Can also create a new parent record if necessary Demo: Do some putting!

DELETE Used to create new records. Just kidding. Can delete a list (array) of records in a single call Demo: Do some deleting!

QUESTIONS? Next session: Demo Application Part 1

DEMO APPLICATION PART 1 Introducing “QuickGive v1” Donation walkthrough Introduction to Stripe payments processor Explore use of Client Credentials to allow somebody we’ve never met to create a Donation record in our database Questions?

DEMO APPLICATION PART 2 REST API wrapper class overview Populating form drop-downs using simple GET operations Posting model to our controller Creating new Donation AND Donation Distribution records in a single API call Questions?

DEMO APPLICATION PART 3 Application summary Possible enhancements or other workflows Questions?

THANK YOU! Cell: