d-velop / dvelop-sdk-go

Official SDK to build Apps for d.velop cloud
Apache License 2.0
12 stars 12 forks source link

Support of authenticating an App Outside the User Context #8

Open mtestrot opened 5 years ago

mtestrot commented 5 years ago

Moved from https://github.com/d-velop/dvelop-app-template-go/issues/4

To authenticate an App Outside the User Context, the new Feature of the Identityprovider is needed. Please Support the Apikey Functions.

https://developer.d-velop.de/documentation/dipa/de/d-ecs-identity-provider-api-125187928.html#section-5

mtestrot commented 5 years ago

@85LangA85 What do you think about the following solution

// AuthSessionIds will be cached internally. So subsequent requests for the same baseuri and Api-Key 
// won't require a call to the Idp if the AuthSessionId has not expired yet.
idp.AuthSessionFor ("https://myserver.invalid", "API_KEY")