Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/core-token.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
## Minimal Token-SDK Configuration

The Token SDK can start with the following minimal configuration:

```yaml
token:
enabled: true
tms:
default:
network: mynetwork
namespace: mynamespace
```

### Required Fields

The following fields are strictly required:

- `network`
- `namespace`

All other configuration sections are optional and use sensible defaults.

# Example core.yaml section

The following example provides descriptions for the various keys required by the Token SDK.
Expand Down
4 changes: 2 additions & 2 deletions token/services/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ func NewConfiguration(cp Provider, keyID string, tmsID driver.TMSID) *Configurat
func (m *Configuration) Validate() error {
// check TMS ID
if len(m.tmsID.Network) == 0 {
return errors.New("missing network id")
return errors.New("token-sdk configuration error: missing required field 'network'")
}
if len(m.tmsID.Namespace) == 0 {
return errors.New("missing namespace id")
return errors.New("token-sdk configuration error: missing required field 'namespace'")
}

for _, validator := range m.validators {
Expand Down
Loading