Skip to content

Commit

Permalink
feat: tokenLifetime, common clients and tokenSource
Browse files Browse the repository at this point in the history
ENG-113 ENG-1432
  • Loading branch information
cowan-macady committed Aug 14, 2023
1 parent f1eb71a commit ee8ece2
Show file tree
Hide file tree
Showing 22 changed files with 715 additions and 880 deletions.
4 changes: 1 addition & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ omit =
indykite_sdk/model/email_attachment.py
indykite_sdk/model/import_digital_twin.py
indykite_sdk/model/get_schema.py
indykite_sdk/utils/hash_methods.py
indykite_sdk/utils/message_to_value.py
indykite_sdk/utils/logger.py
indykite_sdk/utils/*
tests/*
examples/*
prepare_docs/*
Expand Down
80 changes: 40 additions & 40 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,27 @@ https://www.indykite.com/
"privateKeyPKCS8": ""
}
```
A token lifetime is 1h by default. You can change this time (from 2 minutes to 24h) by adding a tokenLifetime parameter.

Conditionally optional parameters:
It will have to be human-readable and Golang-like see -> https://pkg.go.dev/time#ParseDuration

Examples: 30m, 1.5h, 2h45m

Example at the end of the json file:
```
{
...
"privateKeyPKCS8": "-----BEGIN PRIVATE KEY-----\nM\n-----END PRIVATE KEY-----",
"tokenLifetime": "30m"
}
```

Conditionally optional parameters:,
- baseUrl
- defaultTenantId
- endpoint



2. Credentials
#### Identity
You have two choices to set up the necessary credentials. You either pass the json to the `INDYKITE_APPLICATION_CREDENTIALS`
Expand Down
11 changes: 7 additions & 4 deletions codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ coverage:
project:
default:
target: 75%
threshold: 1%
threshold: 3%
patch:
default:
target: 75%
threshold: 10%


ignore:
- "setup.py"
Expand All @@ -20,9 +25,7 @@ ignore:
- "indykite_sdk/model/email_attachment.py"
- "indykite_sdk/model/import_digital_twin.py"
- "indykite_sdk/model/get_schema.py"
- "indykite_sdk/utils/hash_methods.py"
- "indykite_sdk/utils/message_to_value.py"
- "indykite_sdk/utils/logger.py"
- "indykite_sdk/utils"
- "tests"
- "examples"
- "prepare_docs"

0 comments on commit ee8ece2

Please sign in to comment.