|
1 | 1 | using Microsoft.IdentityModel.Protocols.OpenIdConnect;
|
| 2 | +using System.Collections.Generic; |
2 | 3 |
|
3 | 4 | namespace Logto.AspNetCore.Authentication;
|
4 | 5 |
|
@@ -115,4 +116,96 @@ public static class Claims
|
115 | 116 | /// </summary>
|
116 | 117 | public const string Identities = "identities";
|
117 | 118 | }
|
| 119 | + |
| 120 | + /// <summary> |
| 121 | + /// The authentication parameters for Logto sign-in experience customization. |
| 122 | + /// </summary> |
| 123 | + public static class Authentication |
| 124 | + { |
| 125 | + /// <summary> |
| 126 | + /// The first screen to show in the sign-in experience. |
| 127 | + /// See <see href="https://docs.logto.io/docs/references/openid-connect/authentication-parameters/#first-screen"/> for more details. |
| 128 | + /// </summary> |
| 129 | + public static class FirstScreen |
| 130 | + { |
| 131 | + /// <summary> |
| 132 | + /// Show the register form first. |
| 133 | + /// </summary> |
| 134 | + public const string Register = "identifier:register"; |
| 135 | + |
| 136 | + /// <summary> |
| 137 | + /// Show the sign-in form first. |
| 138 | + /// </summary> |
| 139 | + public const string SignIn = "identifier:sign_in"; |
| 140 | + |
| 141 | + /// <summary> |
| 142 | + /// Show the single sign-on form first. |
| 143 | + /// </summary> |
| 144 | + public const string SingleSignOn = "single_sign_on"; |
| 145 | + |
| 146 | + /// <summary> |
| 147 | + /// Show the reset password form first. |
| 148 | + /// </summary> |
| 149 | + public const string ResetPassword = "reset_password"; |
| 150 | + } |
| 151 | + |
| 152 | + /// <summary> |
| 153 | + /// The identifiers to use for authentication. |
| 154 | + /// This parameter MUST be used together with <see cref="FirstScreen"/>. |
| 155 | + /// </summary> |
| 156 | + public static class Identifiers |
| 157 | + { |
| 158 | + /// <summary> |
| 159 | + /// Use email for authentication. |
| 160 | + /// </summary> |
| 161 | + public const string Email = "email"; |
| 162 | + |
| 163 | + /// <summary> |
| 164 | + /// Use phone for authentication. |
| 165 | + /// </summary> |
| 166 | + public const string Phone = "phone"; |
| 167 | + |
| 168 | + /// <summary> |
| 169 | + /// Use username for authentication. |
| 170 | + /// </summary> |
| 171 | + public const string Username = "username"; |
| 172 | + } |
| 173 | + |
| 174 | + /// <summary> |
| 175 | + /// Direct sign-in configuration. |
| 176 | + /// See <see href="https://docs.logto.io/docs/references/openid-connect/authentication-parameters/#direct-sign-in"/> for more details. |
| 177 | + /// </summary> |
| 178 | + public class DirectSignIn |
| 179 | + { |
| 180 | + /// <summary> |
| 181 | + /// The target identifier for direct sign-in. |
| 182 | + /// </summary> |
| 183 | + public string Target { get; set; } = string.Empty; |
| 184 | + |
| 185 | + /// <summary> |
| 186 | + /// The sign-in method. |
| 187 | + /// </summary> |
| 188 | + public string Method { get; set; } = string.Empty; |
| 189 | + |
| 190 | + public static class Methods |
| 191 | + { |
| 192 | + /// <summary> |
| 193 | + /// Single sign-on method. |
| 194 | + /// </summary> |
| 195 | + public const string Sso = "sso"; |
| 196 | + |
| 197 | + /// <summary> |
| 198 | + /// Social sign-in method. |
| 199 | + /// </summary> |
| 200 | + public const string Social = "social"; |
| 201 | + } |
| 202 | + } |
| 203 | + |
| 204 | + /// <summary> |
| 205 | + /// Extra parameters to be passed to the authorization endpoint. |
| 206 | + /// </summary> |
| 207 | + public class ExtraParams : Dictionary<string, string> |
| 208 | + { |
| 209 | + } |
| 210 | + } |
118 | 211 | }
|
0 commit comments