Ü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.
Add
ueberauth_id_austriato your list of dependencies inmix.exs:def deps do [ {:ueberauth_id_austria, "~> 0.1.0"} ] endAdd ID Austria to your Überauth configuration:
config :ueberauth, Ueberauth, providers: [ eid: {Ueberauth.Strategy.IdAustria, []} ]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")Setup your auth controller with the Überauth plug:
defmodule MyApp.AuthController do use MyApp.Web, :controller plug Ueberauth ... endSetup the routes:
scope "/auth", MyApp do pipe_through :browser get "/:provider", AuthController, :request get "/:provider/callback", AuthController, :callback endYour controller needs to implement callbacks to deal with
Ueberauth.AuthandUeberauth.Failureresponses.
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