Skip to content

An Überauth strategy for ID Austria (eIDAS) authentication.

License

Notifications You must be signed in to change notification settings

hofstaetter/ueberauth_id_austria

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Überauth IDAustria

Provides an Ueberauth strategy for authenticating with ID Austria (the austrian eIDAS implementation). See the eIDAS Regulation for infos about eIDAS.

Installation

Prerequisite: You have to be an registered service with the ID Austria system. Information about registering can be obtained from the EGIZ.

  1. Add ueberauth_id_austria to your list of dependencies in mix.exs:

    def deps do
      [
        {:ueberauth_id_austria, "~> 0.1.0"}
      ]
    end
  2. Add ID Austria to your Überauth configuration:

    config :ueberauth, Ueberauth,
      providers: [
        eid: {Ueberauth.Strategy.IdAustria, []}
      ]
  3. Add the provider configuration:

    config :ueberauth, Ueberauth.Strategy.IdAustria.OAuth,
      client_id: System.get_env("EID_CLIENT_ID"),
      client_secret: System.get_env("EID_CLIENT_SECRET")
  4. Setup your auth controller with the Überauth plug:

     defmodule MyApp.AuthController do
       use MyApp.Web, :controller
       plug Ueberauth
    
       ...
     end
  5. Setup the routes:

     scope "/auth", MyApp do
       pipe_through :browser
    
       get "/:provider", AuthController, :request
       get "/:provider/callback", AuthController, :callback
     end
  6. Your controller needs to implement callbacks to deal with Ueberauth.Auth and Ueberauth.Failure responses.

Development/Test-System

The Ueberauth.Strategy.IdAustria.OAuth module differentiates between :prod and other environments. For :prod the productive eid.oesterreich.gv.at endpoint is used.

Otherwise the test endpoint eid2.oesterreich.gv.at is used. There are predefined test identities that can be used via this endpoint. A list and description is available at the EGIZ homepage.

To enable testing mode you have to include the following in your configuration:

config :ueberauth_id_austria, :prod, false

About

An Überauth strategy for ID Austria (eIDAS) authentication.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages