I've asked this question about doing a similar thing with SAML tokens. I only point to this question so you understand what I am looking for. In simple words - WebAPI-to-WebAPI authentication.
Here I am trying to achieve the same thing with OpenID Connect. Bottom line, I want to supply the credentials to the OpenId Authentication server and retrieve a token, which I can then parse and get claims out of it. All in code.
I see a lot of this kind stuff
https://accounts.google.com/o/oauth2/v2/auth?
response_type=code&
client_id=424911365001.apps.googleusercontent.com&
scope=openid%20email&
redirect_uri=https%3A//oauth2.example.com/code&
state=security_token%3D138r5719ru3e1%26url%3Dhttps%3A%2F%2Foauth2-login-demo.example.com%2FmyHome&
login_hint=jsmith@example.com&
nonce=0394852-3190485-2490358&
hd=example.com
But I am not getting, how to logon any given user programmatically?