Files
fasten-onprem/backend/pkg/models/client_registration_request.go
Jason Kulatunga a5b37159c1 - make sure that we can generate offline tokens for Epic providers (using dynamic client registration - https://fhir.epic.com/Documentation?docId=Oauth2&section=Standalone-Oauth2-OfflineAccess-0)
- when SourceCredential is sent to the CreateSource API, we'll check if dynamic client regirstion is enabled. If it is, we'll use this token to register a new client, store the client information, and geneate a new Access Token using the key pair associated with this newly registered client.
- added additional fields to SourceCredential table (registration_endpoint, dynamic_client_registration_mode, dynamic_client_jwks, dynamic_client_id)
- renamed RefreshTokens to SetTokens in SourceCredential model - to have consistent naming
- added IsDynamicClient and RefreshDynamicClientAccessToken methods to SourceCredential Model

fixes #178
2023-07-19 22:45:14 -07:00

18 lines
469 B
Go

package models
type ClientRegistrationRequest struct {
SoftwareId string `json:"software_id"`
Jwks ClientRegistrationRequestJwks `json:"jwks"`
}
type ClientRegistrationRequestJwks struct {
Keys []ClientRegistrationRequestJwksKey `json:"keys"`
}
type ClientRegistrationRequestJwksKey struct {
KeyId string `json:"kid"`
KeyType string `json:"kty"`
PublicExponent string `json:"e"`
Modulus string `json:"n"`
}