https://github.com/philips-software/swift-hsdp-sdk
https://github.com/philips-software/swift-hsdp-sdk
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/philips-software/swift-hsdp-sdk
- Owner: philips-software
- License: mit
- Created: 2022-09-08T08:04:38.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-24T09:29:09.000Z (over 3 years ago)
- Last Synced: 2025-03-12T02:47:12.961Z (over 1 year ago)
- Language: Swift
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# swift-hsdp-sdk
[](https://github.com/philips-software/swift-hsdp-sdk/actions/workflows/swift.yaml)
[](https://opensource.org/licenses/MIT)
This SDK provides a simple interface to features offered by the IAM services of HSDP.
The output of the project is a libary that you can import as a package in your xcode environment.
## Table of contents
- [Using in your projects](#using-in-your-projects)
- [Basic usage](#basic-usage)
- [Supported APIs](#supported-apis)
- [Todo](#todo)
- [Issues](#issues)
- [Contact / Getting help](#contact--geting-help)
- [License](#license)
## Using in your projects
The library dependency can be included in your projects by adding https://github.com/philips-software/swift-hsdp-sdk as package collection.
## Basic Usage
```
import SwiftHsdpSdk
let iam = IamOAuth2(region: .EuWest, environment: .Prod, clientId: "public-client", clientSecret: "")
Task {
do {
let token = try await iam.login(username: "martijn.van.welie@philips.com", password: "WishYoueWereHere");
print("got \(token.accessToken)")
let introspect = try await iam.introspect()
print("introspect: \(introspect)")
let refreshedToken = try await iam.refresh(iam.token)
print("got \(refreshedToken)")
try await iam.revoke()
} catch {
print("error: \(error)")
}}
```
## Supported APIs
The current implementation covers only a subset of HSDP APIs. Additional functionality is built as needed.
- [x] IAM Identity and Access Management (IAM)
- [ ] Access Management
- [ ] Federation
- [x] OAuth2
- [x] OAuth2 Authorization
- [x] OAuth2 Token Revocation
- [ ] OpenID Connect UserInfo
- [x] Introspect
- [x] Session (refresh, terminate)
- [ ] OpenID (configuration, JWKS)
Other services can follow later.
## Todo
- Implement more HSDP API calls
## Issues
- If you have an issue: report it on the [issue tracker](https://github.com/philips-software/swift-hsdp-sdk/issues)
## Contact / Getting help
Matthijs van Marion () \
Martijn van Welie ()
## License
See [LICENSE.md](LICENSE.md).