Ueberauth OpenAM Strategy
Installation
-
Add
ueberauthandueberauth_openamto your list of dependencies inmix.exs:
def deps do
[
{:ueberauth, "~> 0.2"},
{:ueberauth_openam, "~> 0.1.0"},
]
end-
Ensure
ueberauth_openamis started before your application:
def application do
[applications: [:ueberauth_openam]]
end-
Configure the OpenAM integration in
config/config.exs:
config :ueberauth, Ueberauth,
providers: [openam: {Ueberauth.Strategy.OpenAM, [
base_url: "http://websso.example.com/",
sso_cookie: "openAMssoToken",
]}]-
In
AuthControlleruse the OpenAM strategy in yourlogin/4function:
def login(conn, _params, _current_user, _claims) do
conn
|> Ueberauth.Strategy.OpenAM.handle_request!
endContributing
Issues and Pull Requests are always welcome!