The auth module is written in Go and should be part of nuts-go as an engine.
This projects is using go modules, so version > 1.12 is recommended. 1.10 would be a minimum.
Tests can be run by executing
go test ./...
Generate the api package from the OpenAPI specification
oapi-codegen -generate server,types -package v0 docs/_static/nuts-auth.yaml > api/v0/generated.go
oapi-codegen -generate server,types -package experimental docs/_static/nuts-auth-experimental.yaml > api/experimental/generated.go
Embed files like certificates from the bindata directory
go-bindata -ignore=\\.DS_Store -pkg=assets -o=./assets/bindata.go -prefix=bindata ./bindata/...
When making changes to the client interface run the following command to regenerate the mock:
mockgen -destination=mock/mock_auth_client.go -package=mock_auth -source=pkg/auth.go
mockgen -destination=mock/services/mock.go -package=mock_services -source=pkg/services/services.go
mockgen -destination=mock/contract/signer_mock.go -source=pkg/contract/signer.go
This project is part of https://github.com/nuts-foundation/nuts-go. If you do however would like a binary, just use go build
.
The readme is auto-generated from a template and uses the documentation to fill in the blanks.
./generate_readme.sh
This script uses rst_include
which is installed as part of the dependencies for generating the documentation.
To generate the documentation, you'll need python3, sphinx and a bunch of other stuff. See nuts-documentation-development-documentation
The documentation can be build by running
/docs $ make html
The resulting html will be available from docs/_build/html/index.html
The following configuration parameters are available:
Key | Default | Description |
---|---|---|
actingPartyCn | The acting party Common name used in contracts | |
address | localhost:1323 | Interface and port for http server to bind to, default: localhost:1323 |
enableCORS irmaConfigPath |
false |
Set if you want to allow CORS requests. This is useful when you want browsers to directly communicate with the nuts node. path to IRMA config folder. If not set, a tmp folder is created. |
irmaSchemeManager mode publicUrl |
pbdf |
The IRMA schemeManager to use for attributes. Can be either 'pbdf' or 'irma-demo', default: pbdf server or client, when client it does not start any services so that CLI commands can be used. Public URL which can be reached by a users IRMA client |
skipAutoUpdateIrmaSchemas | false | set if you want to skip the auto download of the irma schemas every 60 minutes. |
As with all other properties for nuts-go, they can be set through yaml:
yaml
- auth:
publicUrl: "https://nuts.nl"
as commandline property
shell
./nuts --auth.publicUrl https://nuts.nl
Or by using environment variables
shell
NUTS_AUTH_PUBLIC_URL=https://nuts.nl ./nuts