question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add additional values into Authorize endpoint response

See original GitHub issue

I integrate with Twilio and it requires me to produce a Twilio access token for client to work with their services. Is there an integration point with which I can add tw_access_token value into an Authorize endpoint response along with id_token and access_token?

PS: do you want such questions to be posted on StackOverflow?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:24 (24 by maintainers)

github_iconTop GitHub Comments

4reactions
kevinchaletcommented, Mar 17, 2020

New plan: in 3.0, the ASP.NET Core host will natively support returning custom parameters set via the new AuthenticationProperties.Parameters property introduced in ASP.NET Core 2.1. Both challenge, sign-in (authorization and token responses) and sign-out will be supported. E.g:

var properties = new AuthenticationProperties(
    items: new Dictionary<string, string>(),
    parameters: new Dictionary<string, object>
    {
        ["boolean_parameter"] = true,
        ["integer_parameter"] = 42,
        ["string_parameter"] = "Bob l'Eponge",
        ["array_parameter"] = JsonSerializer.Deserialize<JsonElement>(@"[""Contoso"",""Fabrikam""]"),
        ["object_parameter"] = JsonSerializer.Deserialize<JsonElement>(@"{""parameter"":""value""}")
    });

return SignIn(principal, properties, OpenIddictServerAspNetCoreDefaults.AuthenticationScheme);

Note: a custom event handler will be required when using OpenIddict on OWIN, as AuthenticationProperties.Parameters doesn’t exist in the OWIN type.

1reaction
kevinchaletcommented, Dec 16, 2019

You’re welcome 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

oauth 2.0 - How can I set Extra Data into Access Token in ...
The only way I achieved to pass information to the token creation was using the User property: var response = this.AuthServer.
Read more >
How to add extra properties to an access token
An authorization server sets properties to a request to Authlete's /auth/token API. Authlete associates the properties with the new access token and provide ......
Read more >
Authorize endpoint - Amazon Cognito
Use the authorize OAuth 2.0 and OIDC endpoint to sign in to Amazon Cognito. ... Add this value to your requests to guard...
Read more >
The Authorization Response - OAuth 2.0 Simplified
With the Implicit grant ( response_type=token ) the authorization server generates an access token immediately and redirects to the callback URL ...
Read more >
Authorize Endpoint — IdentityServer4 1.0.0 documentation
The authorize endpoint can be used to request tokens or authorization codes via the browser. This process typically involves authentication of the end-user ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found