Specify and implement auth operation. A request should contain type, authServerUrl and credential at least. Response should return some info about the user.
Examples:
for type: oauth2 and/or oidc, auth server url: auth.example.com and credential: eyJxxx, microservice will make a GET request to auth.example.com/oidc/v1/userinfo with header Authorization: Bearer eyJxxx. If server returns 200 response, map sub to id, preferred_username to username and put the rest of the parameters to userData map. If server returns 401 response, signalize that credential is invalid (e.g. via gRPC error). Concrete example using Zitadel cloud as auth service: image
for type: basic, auth server url: auth.example.com/validate and credential: cnM6Mg==, microservice will make a POST request to auth.example.com/validate with header Authorization: Basic cnM6Mg==, and handle response parsing the same as in previous. I don't have a concrete example here.
possibly other types, e.g. OAS3 allows type to be apiKey (see here), but I'm not sure how exactly would that work and what is needed. Maybe consider using HashiCorp Vault (installation docs, C# lib), either for this, basic auth, both, or something else.
Specify and implement auth operation. A request should contain
type
,authServerUrl
andcredential
at least. Response should return some info about the user.Examples:
sub
toid
,preferred_username
tousername
and put the rest of the parameters touserData
map. If server returns 401 response, signalize that credential is invalid (e.g. via gRPC error). Concrete example using Zitadel cloud as auth service: image