Git Product home page Git Product logo

isabella232 / azure-activedirectory-library-for-ruby Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azuread/azure-activedirectory-library-for-ruby

0.0 0.0 0.0 250 KB

The ADAL for Ruby library makes it easy for Ruby applications to authenticate to AAD in order to access AAD protected web resources.

Home Page: http://www.windowsazure.com/en-us/services/active-directory/

License: MIT License

Ruby 98.40% HTML 1.60%

azure-activedirectory-library-for-ruby's Introduction

Windows Azure Active Directory Authentication Library (ADAL) for Ruby

Build Status Code Climate

The ADAL for Ruby library makes it easy for Ruby applications to authenticate to AAD in order to access AAD protected web resources.

Installation

You can install the ADAL gem with Rubygems.

gem install adal

Alternatively, you can build the gem from scratch.

git clone [email protected]:AzureAD/azure-activedirectory-for-ruby.git
cd azure-activedirectory-for-ruby
gem build adal.gemspec
gem install adal

Samples

The samples folder contains several applications demonstrating different ways to authenticate. None of the samples will work out of the box, they require set-up and configuration through the Azure portal. Make sure to check out the README for each sample to get them running.

How to run tests

The tests in this repo use the RSpec framework for behavior-driven testing. RSpec can be invoked directly or as a Rake task. The preferred way to execute the test suite is

Checkout the repo

git clone [email protected]:AzureAD/azure-activedirectory-library-for-ruby

Install the dependencies

bundle install

Run the tests

bundle exec rake spec

How to run Rubocop

This gem abides by the Rubocop defaults. Rubocop is set up as a Rake task. The preferred way to execute Rubocop for this repo is

Checkout the repo

git clone [email protected]:AzureAD/azure-activedirectory-library-for-ruby

Install the dependencies

bundle install

Run Rubocop

bundle exec rake rubocop

Diagnostics

Logs, correlation ids and timestamps are required with all requests for help in debugging.

You can configure ADAL to generate log messages that you can use to help diagnose issues. The log outputs are standard to Ruby's built-in logger. An example ADAL log message looks like this:

I, [2015-08-18T06:58:12.767490 #9231]  INFO -- 969f3e30-8f42-4342-b135-f5c754a6b4a8: Multiple WS-Trust endpoints were found in the mex response. Only one was used.

The I is a shorthand for INFO that makes parsing logs easier. ADAL supports five different logging levels, VERBOSE, INFO, WARN, ERROR and FATAL. The timestamp is taken from the client machine. The GUID before the message is a correlation id that is used to track logs from the client to the server.

To set the lowest log level to output, include something like this in your configuration:

ADAL::Logging.log_level = ADAL::Logger::VERBOSE

By default, ADAL logs are printed to STDOUT. To change the log output, pass a Ruby IO object to ADAL like this in your configuration:

ADAL::Logging.log_output = File.open('/path/to/adal.logs', 'w')

Community Help and Support

We leverage Stack Overflow to work with the community on supporting Azure Active Directory and its SDKs, including this one! We highly recommend you ask your questions on Stack Overflow (we're all on there!) Also browse existing issues to see if someone has had your question before.

We recommend you use the "adal" tag so we can see it! Here is the latest Q&A on Stack Overflow for ADAL: http://stackoverflow.com/questions/tagged/adal

Security Reporting

If you find a security issue with our libraries or services please report it to [email protected] with as much detail as possible. Your submission may be eligible for a bounty through the Microsoft Bounty program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. We encourage you to get notifications of when security incidents occur by visiting this page and subscribing to Security Advisory Alerts.

Contributing

All code is licensed under the MIT license and we triage actively on GitHub. We enthusiastically welcome contributions and feedback. You can fork the repo and start contributing now. More details about contributing.

License

Copyright (c) Microsoft Corporation. Licensed under the MIT License.

We Value and Adhere to the Microsoft Open Source Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

azure-activedirectory-library-for-ruby's People

Contributors

aj-michael avatar brandwe avatar cchar avatar omercs avatar rpangrle 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.