OpenIdDict 4 (26.12.2022 W) Flashcards

1
Q

What if you enable passthrough, but don’t provide action or forget to add MapControllers?

A

You will receive 404 not found status code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does SignIn method do in token action of the controller?

A

It is standard ControllerBase method.
It creates SignInResult which is ActionResult. Receiving it middleware calls HttpContext.SignInAsync().

You have to specify OpenIdDict authentication scheme. It makes middleware passes controll to OpeidDict. Which issues tokens for you.

SignInResult must contain ClaimsPrincipal created by you.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why OpenIdDict doesn’t include scopes automatically?

A

OpenIddict has already checked if the requested scopes are allowed (in general and for the current client). The reason why we have to add the scopes manually here is that we are able to filter the scopes granted here if we want to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to enable Implicit Flow on server level?

A

AddServer().AllowImplicitFlow()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Hot to enable AuthorizationCode flow?

A

AddServer().AllowAuthorizationCodeFlow()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Hot to enable AuthorizationCode flow and require PKCE?

A

AddServer().AllowAuthorizationCodeFlow().RequireProofKeyForCodeExchange()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly