Giter Club home page Giter Club logo

aerogear-ios-oauth2's Introduction

aerogear-ios-oauth2

Maintenance circle-ci License GitHub release CocoaPods Platform

OAuth2 Client based on aerogear-ios-http.

Project Info
License: Apache License, Version 2.0
Build: CocoaPods
Languague: Swift 4
Documentation: http://aerogear.org/ios/
Issue tracker: https://issues.jboss.org/browse/AGIOS
Mailing lists: aerogear-users (subscribe)
aerogear-dev (subscribe)

Table of Content

Features

  • Account manager for multiple OAuth2 accounts,
  • Request access and refresh token,
  • Grant access through secure external browser and URI schema to re-enter app,
  • (implicit or explicit) refresh tokens,
  • Revoke tokens,
  • Permanent secure storage,
  • Adaptable to OAuth2 specific providers. Existing extensions: Google, Facebook, Keycloak
  • OpenID Connect login

Installation

CocoaPods

In your Podfile add:

pod 'AeroGearOAuth2'

and then:

pod install

to install your dependencies

Usage

Grant for GET with a predefined config like Facebook

let facebookConfig = FacebookConfig(
    clientId: "YYY",
    clientSecret: "XXX",
    scopes:["photo_upload, publish_actions"]
)
let oauth2Module = AccountManager.addFacebookAccount(config: facebookConfig)

let http = Http()
http.authzModule = oauth2Module
http.request(method: .get, path: "/get", completionHandler: {(response, error) in
	// handle response
})

OpenID Connect with Keycloak

let keycloakConfig = KeycloakConfig(
    clientId: "sharedshoot-third-party",
    host: "http://localhost:8080",
    realm: "shoot-realm",
    isOpenIDConnect: true
)
let oauth2Module = AccountManager.addKeycloakAccount(config: keycloakConfig)

let http = Http()
http.authzModule = oauth2Module
oauth2Module.login {(accessToken: AnyObject?, claims: OpenIdClaim?, error: NSError?) in // [1]
    // Do your own stuff here
}

Documentation

For more details about that please consult our documentation.

Demo apps

Take a look in our demo apps:

Development

If you would like to help develop AeroGear you can join our developer's mailing list, join #aerogear on Freenode, or shout at us on Twitter @aerogears.

Also takes some time and skim the contributor guide

Questions?

Join our user mailing list for any questions or help! We really hope you enjoy app development with AeroGear!

Found a bug?

If you found a bug please create a ticket for us on Jira with some steps to reproduce it.

aerogear-ios-oauth2's People

Contributors

camilamacedo86 avatar corinnekrych avatar cvasilak avatar danielpassos avatar ezefranca avatar jcesarmobile avatar jorunfa avatar logiebear avatar matzew avatar readmecritic avatar romainfrancez 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.