Documentation
¶
Overview ¶
Package eduapi implements the Edu-API integration service for the API Gateway. It fetches student data from a 1EdTech Edu-API compliant SIS (e.g. Ladok) and transforms it into credential claims for OpenID4VCI issuance.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the Edu-API integration service for the API Gateway.
func New ¶
func New(ctx context.Context, cfg *eduapi.Config, docCache pkgcache.Cache[map[string]*model.CompleteDocument], tokenCache pkgcache.Cache[string], log *logger.Log) (*Service, error)
New creates a new Edu-API service.
func (*Service) FetchAndStoreForVCI ¶
func (s *Service) FetchAndStoreForVCI(ctx context.Context, personID, credentialType, vciSessionID string) error
FetchAndStoreForVCI queries the Edu-API for a person's education data, transforms it using the configured credential mappings, and stores the resulting document in the VCI session cache.
personID is the Edu-API sourcedId that identifies the student. credentialType is the credential type being issued (e.g. "EuropeanStudentID"). vciSessionID is the OpenID4VCI session to associate the document with.
func (*Service) GetCredentialTypes ¶
GetCredentialTypes returns the list of credential types this service handles.