GithubHelp home page GithubHelp logo

pingidentity / ios-appauth-sample-application Goto Github PK

View Code? Open in Web Editor NEW
9.0 6.0 2.0 91 KB

Sample iOS application using the OpenID Foundation AppAuth reference libraries

License: Apache License 2.0

Objective-C 100.00%

ios-appauth-sample-application's Introduction

iOS9 Native Application SSO Sample Application

ios-appauth-sample-application is a basic sample application to demonstrate native application single sign-on using the AppAuth library for iOS from the OpenID Foundation.

This sample application is based on the "example" in the AppAuth reference libraries and will authenticate the user and present the user's subject and tokens on the screen. Options to refresh the OAuth 2.0 access token and to refresh the authentication session are also demonstrated.

Refer to the Mobile Application SSO Developers Guide for more detailed information.

Note: You can get developer licenses and the PingFederate software at https://developer.pingidentity.com/get-started

Installation

This sample application has been built using PingFederate 8.0.1 and the OAuth Playground 3.2. Follow the documentation for PingFederate and the OAuth Playground to quickly stand up an OpenID Connect Provider / OAuth Authorization Server.

You will need

XCode & project configuration

  • Open this project (ios-appauth-sample-application) in XCode
  • Add the AppAuth library for iOS project to your XCode project (File > Add Files to Project.. and browse to the AppAuth.xcodeproj file)
  • Modify the project settings of the ios-appauth-sample-application
    • under Build Settings, modify the "Header Search Paths" to include the location of the AppAuth .h files
    • under Build Phases, add to the "Link Binary With Libraries" list and add libAppAuth.a and SafariServices.framework
  • Modify the MainViewController.m file to define your PingFederate server, your client_id and redirect_uri

PingFederate configuration

  • Install PingFederate and the OAuth Playground (see the readme in the OAuth Playground distribution)
  • Modify the OAuth client "ac_client" in the PingFederate configuration:
    • OAuth Settings -> Client Management -> ac_client
    • Edit the "Redirect URIs" option to include the application callback URI (com.pingidentity.developer.appauth://oidc_callback)

Note: Due to the Application Transport Security (ATS) feature of iOS9, your PingFederate server must have a valid SSL certificate.

Disclaimer

This software is open sourced by Ping Identity but not supported commercially as such. Any questions/issues/comments should be directed to the "Developer Q&A" group in the Ping Identity Support Communities https://community.pingidentity.com/collaborate.

ios-appauth-sample-application's People

Contributors

pm-ping avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ios-appauth-sample-application's Issues

AppAuth-iOS library update

it seems that AppAuth library update made the current code fail to compile. the OIDAuthorizationRequest *request = [[OIDAuthorizationRequest alloc] InitWithConfiguration:configuration no longer has codeVerifier and a few others exposed.

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.