Skip to content

mitigate-dev/omniauth-openam

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OmniAuth OpenAM

Continuous Integration status

OmniAuth strategy for authenticating to OpenAM.

Installation

Add to your Gemfile:

gem 'omniauth-openam'

Usage

Here's a quick example, adding the middleware to a Rails app in config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :openam, 'https://example.com/opensso'
end

Auth Hash

Here's an example Auth Hash available in request.env['omniauth.auth']:

{
  provider: "openam",
  uid: "bjensen",
  info: {
    email: "bjensen@example.com",
    first_name: "Barbara",
    last_name: "Jensen",
    name: "Babs Jensen",
    username: "bjensen",
  },
  credentials: {
    token: "AQIC5wM2LY4SfcxuxIP0VnP2lVjs7ypEM6VDx6srk56CN1Q.*AAJTSQACMDE.*"
  },
  extra: {
    raw_info: {
      token: "AQIC5wM2LY4SfcxuxIP0VnP2lVjs7ypEM6VDx6srk56CN1Q.*AAJTSQACMDE.*",
      cn: ["Babs Jensen", "Barbara Jensen"],
      dn: ["uid=bjensen,ou=people,dc=example,dc=com"],
      givenname: ["Barbara"],
      mail: ["bjensen@example.com"],
      objectclass: ["organizationalPerson", "person", "inetOrgPerson", "top"],
      sn: ["Jensen"],
      telephonenumber: ["+1 408 555 1862"],
      uid: ["bjensen"]
    }
  }
}

About

This is a ruby gem for omnaiuth providing basic login with OpenAM

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%