コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientSession" /> class.
 /// </summary>
 /// <param name="active">Active state. If false the session is no longer active..</param>
 /// <param name="authenticatedAt">The Session Authentication Timestamp  When this session was authenticated at. If multi-factor authentication was used this is the time when the last factor was authenticated (e.g. the TOTP code challenge was completed)..</param>
 /// <param name="authenticationMethods">A list of authenticators which were used to authenticate the session..</param>
 /// <param name="authenticatorAssuranceLevel">authenticatorAssuranceLevel.</param>
 /// <param name="expiresAt">The Session Expiry  When this session expires at..</param>
 /// <param name="id">id (required).</param>
 /// <param name="identity">identity (required).</param>
 /// <param name="issuedAt">The Session Issuance Timestamp  When this session was issued at. Usually equal or close to &#x60;authenticated_at&#x60;..</param>
 public ClientSession(bool active = default(bool), DateTime authenticatedAt = default(DateTime), List <ClientSessionAuthenticationMethod> authenticationMethods = default(List <ClientSessionAuthenticationMethod>), ClientAuthenticatorAssuranceLevel authenticatorAssuranceLevel = default(ClientAuthenticatorAssuranceLevel), DateTime expiresAt = default(DateTime), string id = default(string), ClientIdentity identity = default(ClientIdentity), DateTime issuedAt = default(DateTime))
 {
     // to ensure "id" is required (not null)
     if (id == null)
     {
         throw new ArgumentNullException("id is a required property for ClientSession and cannot be null");
     }
     this.Id = id;
     // to ensure "identity" is required (not null)
     if (identity == null)
     {
         throw new ArgumentNullException("identity is a required property for ClientSession and cannot be null");
     }
     this.Identity                    = identity;
     this.Active                      = active;
     this.AuthenticatedAt             = authenticatedAt;
     this.AuthenticationMethods       = authenticationMethods;
     this.AuthenticatorAssuranceLevel = authenticatorAssuranceLevel;
     this.ExpiresAt                   = expiresAt;
     this.IssuedAt                    = issuedAt;
     this.AdditionalProperties        = new Dictionary <string, object>();
 }
コード例 #2
0
ファイル: ClientSelfServiceLoginFlow.cs プロジェクト: ory/sdk
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientSelfServiceLoginFlow" /> class.
 /// </summary>
 /// <param name="active">active.</param>
 /// <param name="createdAt">CreatedAt is a helper struct field for gobuffalo.pop..</param>
 /// <param name="expiresAt">ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated. (required).</param>
 /// <param name="id">id (required).</param>
 /// <param name="issuedAt">IssuedAt is the time (UTC) when the flow started. (required).</param>
 /// <param name="refresh">Refresh stores whether this login flow should enforce re-authentication..</param>
 /// <param name="requestUrl">RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL&#39;s path or query for example. (required).</param>
 /// <param name="requestedAal">requestedAal.</param>
 /// <param name="returnTo">ReturnTo contains the requested return_to URL..</param>
 /// <param name="type">The flow type can either be &#x60;api&#x60; or &#x60;browser&#x60;. (required).</param>
 /// <param name="ui">ui (required).</param>
 /// <param name="updatedAt">UpdatedAt is a helper struct field for gobuffalo.pop..</param>
 public ClientSelfServiceLoginFlow(ClientIdentityCredentialsType active = default(ClientIdentityCredentialsType), DateTime createdAt = default(DateTime), DateTime expiresAt = default(DateTime), string id = default(string), DateTime issuedAt = default(DateTime), bool refresh = default(bool), string requestUrl = default(string), ClientAuthenticatorAssuranceLevel requestedAal = default(ClientAuthenticatorAssuranceLevel), string returnTo = default(string), string type = default(string), ClientUiContainer ui = default(ClientUiContainer), DateTime updatedAt = default(DateTime))
 {
     this.ExpiresAt = expiresAt;
     // to ensure "id" is required (not null)
     if (id == null)
     {
         throw new ArgumentNullException("id is a required property for ClientSelfServiceLoginFlow and cannot be null");
     }
     this.Id       = id;
     this.IssuedAt = issuedAt;
     // to ensure "requestUrl" is required (not null)
     if (requestUrl == null)
     {
         throw new ArgumentNullException("requestUrl is a required property for ClientSelfServiceLoginFlow and cannot be null");
     }
     this.RequestUrl = requestUrl;
     // to ensure "type" is required (not null)
     if (type == null)
     {
         throw new ArgumentNullException("type is a required property for ClientSelfServiceLoginFlow and cannot be null");
     }
     this.Type = type;
     // to ensure "ui" is required (not null)
     if (ui == null)
     {
         throw new ArgumentNullException("ui is a required property for ClientSelfServiceLoginFlow and cannot be null");
     }
     this.Ui                   = ui;
     this.Active               = active;
     this.CreatedAt            = createdAt;
     this.Refresh              = refresh;
     this.RequestedAal         = requestedAal;
     this.ReturnTo             = returnTo;
     this.UpdatedAt            = updatedAt;
     this.AdditionalProperties = new Dictionary <string, object>();
 }