FdsnPlugs
Collection of plugs related to FDSN webservices.
Installation
If available in Hex, the package can be installed
by adding fdsn_plugs to your list of dependencies in mix.exs:
def deps do
[
{:fdsn_plugs, "~> 0.8.0"}
]
endUsage
This module provides two supersets of plugs : FdsnDataselectPlugs and FdsnAvailabilityPlugs useful to implement respectively dataselect and availability webservices.
Phoenix
Add the plug collection of your services in your plugs pipeline:
pipeline :fdsn do
plug :accepts, ["json", "text", "mseed"]
plug FdsnDataselectPlugs
endEIDA Json token support
To enable EIDA token support in your application, you need to launch the JWKS retrieval.
For Phoenix applications, add in your application.ex:
children = [
{FdsnPlugs.EidaJwkStrategy, time_interval: 600_000, jwks_url: "https://geofon.gfz.de/eas2/jwk", first_fetch_sync: true}
]
The first_fetch_sync has to be set to true.