Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

ghurlman/torii-azure-provider

Repository files navigation

Ember CLI Torii Azure Provider (ECTAP) Code Climate

TLDR

ECTAP is an Azure authentication provider for Torii, rolled up as an EmberCLI addon.

Usage

In order to use ECTAP, you'll need an Ember CLI app (if you already have one, skip this):

$ ember new my-new-app

Then, add Torii and ECTAP to your project:

$ ember install torii
$ ember install ember-cli-torii-azure-provider

Now, edit /config/environment.js to add your Torii provider configuration, placing your Azure Client ID in the designated spot. If you need help creating an Azure app and getting that ID, follow MSDN guidance:

module.exports = function(environment) {
  var ENV = {

  // ... other ENV config stuff here

   ENV['torii'] = {
      providers: {
        'azure-oauth2': {
          apiKey: 'AZURE APP CLIENT ID GOES HERE',
          redirect_uri: "APP URI GOES HERE",
          state: "STATE" // For CSRF, should be random & unguessable
        }
      }
    }

  return ENV;
};

With that, you should be good to go. For an example of how to use this with Ember Simple Auth, check out the sample app for ECTAP.

License

The MIT License (MIT)

Copyright (c) 2015 Greg Hurlman

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.