Überauth CAS Strategy
Central Authentication Service strategy for Überauth.
Installation
-
Add
ueberauthandueberauth_casto your list of dependencies inmix.exs:
```elixir
def deps do
[
{:ueberauth, "~> 0.2"},
{:ueberauth_cas, "~> 1.0.0"},
]
end
```-
Ensure
ueberauth_casis started before your application:
```elixir
def application do
[applications: [:ueberauth_cas]]
end
```-
Configure the CAS integration in
config/config.exs:
```elixir
config :ueberauth, Ueberauth,
providers: [cas: {Ueberauth.Strategy.CAS, [
base_url: "http://cas.example.com",
callback: "http://your-app.example.com/auth/cas/callback",
]}]
```-
In
AuthControlleruse the CAS strategy in yourlogin/4function:
```elixir
def login(conn, _params, _current_user, _claims) do
conn
|> Ueberauth.Strategy.CAS.handle_request!
end
```Compatibility
Überauth CAS was tested with the Casino CAS server implementation. Please let me know if Überauth CAS is incompatible with your CAS server, and why.