MS Graph Authentication Library
gem install msal
Add this line to your application's Gemfile:
gem 'msal', '~> 0.14.2'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install msal
Library is Under development and not ready to use, any kinds of contribution will be appreciated
By below instructions you can create authorization url for starting process
::Msal::Auth.new(
client_id: "your_client_id",
tenant: "your_tenant",
response_type: "`code` by default",
response_mode: "`query` by default",
scope: "your_defined_scope",
redirect_uri: "your_redirect_uri",
state: "optional to keep request state and prevent attack"
)
Then with response data you are able to make request for token
::Msal::Token.new(
client_id: 'your_client_id',
scope: 'your_defined_scope',
code: 'code form auth response',
redirect_uri: 'your_redirect_uri',
grant_type: '`authorization_code` by default',
client_secret: 'your_client_secret'
)
Is also possible to pass tenant
as second argument if you are not using common
tenant.
Bug reports and pull requests are welcome on GitHub at https://github.com/amin-abbasiy/msal. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Msal project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.