szTheory / ueberauth_cas

Central Authentication Service strategy for Überauth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Überauth CAS Strategy

Build Coverage Documentation Deps Hex.pm

Central Authentication Service strategy for Überauth.

Installation

  1. Add ueberauth and ueberauth_cas to your list of dependencies in mix.exs:
```elixir
def deps do
  [
    {:ueberauth, "~> 0.2"},
    {:ueberauth_cas, "~> 1.0.0"},
  ]
end
```
  1. Ensure ueberauth_cas is started before your application:
```elixir
def application do
  [applications: [:ueberauth_cas]]
end
```
  1. 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",
  ]}]
```
  1. In AuthController use the CAS strategy in your login/4 function:
```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.

About

Central Authentication Service strategy for Überauth

License:MIT License


Languages

Language:Elixir 100.0%