-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support identity openapi standard #189
Comments
login{
"tokenType": "Bearer",
"accessToken": "CfDJ8JQ6UejBIoRIkUpEJR_892dspJ-O86oy40XNFLGLz60aayDqXmN_iBJbCi-XHSdECCl0wNlmk_z7jauKDhubjbvnzLIR3i5B4tJW81eLnGgeTlyMtKyeFi7Cuhtctsw2cgyyCdf18V46yYGtLfYMPdupbrJSyBFMhSpRwUjOPs1k-0CisA3i3wlv9G0wNj4n8S1LXQYzxiF5RqjAye_kqgfHtmJy3KY4_-PVTjaLyBT52v1a34ZLvWlcV_oHd32mgg9RRk_T_CSWCag2wL1XYlEP2MHQ61uOdpE_z-LkuxgOCpoubelPiaWLUZhyQySi256TyjW6DcDOOvqsrhu0-gkUWeykJKD0S80Q4bRXJxUgqFUFz_2u5M0ZnwxC4Q7BGrfCe5r9Yck8HbrbB7yddEBRUDeaVdMPSrt8ckhvZb55DwG1gmvri4L0ElbpUlrfS5srr6vDc-k6ERvwF00f4lS6g6ZC900xJuXTsdATVzWXUpnsYhLZhJNP89PNy0QFwF8F_x7vxHZzEDDP5QTOh1pP4hem3C4ubIIqiA23Hf-HjtuHvLMq7CuMpOpW9RnGucu8ut3hLyi6eWwa9wopoeVsRinbM8NvfnPtFfzAghxi9MaEPT57oFw3UlDgU8ASb4TXzx2AwRYeq0rrbq6YCnp9ZNmTZJzH8DaLkJE8flz9Wqk-ekjlsmK3MDx7qgdcnxuXTbs0k2c-P0XKL4WzgW8",
"expiresIn": 3600,
"refreshToken": "CfDJ8JQ6UejBIoRIkUpEJR_892eLslb7k4rBSVMLeyiE_Rc_fU3afrhLQpjI_m8PKfVbwK7PBjvY-_5gc_87F--SyHdiVaTAVbzwinMN9asPc4XLNuiPM6YsUBI1k6syOYaMRkhlkgJbFZ_YWEyeIcPxXzfVSqbWQE4rjhINhGFVWZz2qUlHjuBxQ6o5XcxUNOaKOHiyPleorR_keLdSXI8sY7706e10xqAhwVnhcJ_YLZItRdWAhYXPHrK2q994BiseITejRouNHhs4qfrgDI1JPnyIR8fWnrXoONBH3s0R94nqgr6AB2YIe6QvyFtiIOnI7_Q8ZuGlVs5OqMgHqYHPAWRehoJ9JlyQ4ZuqxBqLEDcu4H0YJT8WwfcO9k1-_2b7grgCzF5GX1D4_-juJu91pYuXR7QuQNcGPVIPVkLdVQMy18m-J87zGqhcL2xi3UC8cigvp6gvpKiU2ideIvPZtmYsJSulb1DTnh5FyfdJGt4nwuJiZYl7NJqxQIE-yyJPqse3c3t1nKCU9AUEFiNRLq5friuvNBCiZ_ich_bRIrbeJBHr-qHOQRzQqDXp62UrryVVVdE30I8YRsD9FmcLhKMxJofiez_ASFZvtWMzsD3DLKS5_he9oGW2ncQlGbBwoqVzB3-ft__WskSm0VurOeBsSw99cS0VbZ3VMRGs8VRkFnPuGukw-Yj4Rkx0JRm4OwAOvikl80w-9hccdNSBfpA"
} |
Register
|
private static IdentityBuilder AddIdentityApiEndpoints<TUser, TContext>(IServiceCollection services)
where TUser : class, new()
where TContext : DbContext
{
return services.AddDbContext<TContext>((sp, options) => options.UseSqlite(sp.GetRequiredService<SqliteConnection>()))
.AddIdentityApiEndpoints<TUser>().AddEntityFrameworkStores<TContext>();
} |
public static IdentityBuilder AddIdentityApiEndpoints<TUser>(this IServiceCollection services, Action<IdentityOptions> configure)
where TUser : class, new()
{
ArgumentNullException.ThrowIfNull(services);
ArgumentNullException.ThrowIfNull(configure);
services
.AddAuthentication(IdentityConstants.BearerAndApplicationScheme)
.AddScheme<AuthenticationSchemeOptions, CompositeIdentityHandler>(IdentityConstants.BearerAndApplicationScheme, null, compositeOptions =>
{
compositeOptions.ForwardDefault = IdentityConstants.BearerScheme;
compositeOptions.ForwardAuthenticate = IdentityConstants.BearerAndApplicationScheme;
})
.AddBearerToken(IdentityConstants.BearerScheme)
.AddIdentityCookies();
return services.AddIdentityCore<TUser>(configure)
.AddApiEndpoints();
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: