Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HydraLogoutRequest" /> class.
 /// </summary>
 /// <param name="challenge">Challenge is the identifier (\&quot;logout challenge\&quot;) of the logout authentication request. It is used to identify the session..</param>
 /// <param name="_client">_client.</param>
 /// <param name="requestUrl">RequestURL is the original Logout URL requested..</param>
 /// <param name="rpInitiated">RPInitiated is set to true if the request was initiated by a Relying Party (RP), also known as an OAuth 2.0 Client..</param>
 /// <param name="sid">SessionID is the login session ID that was requested to log out..</param>
 /// <param name="subject">Subject is the user for whom the logout was request..</param>
 public HydraLogoutRequest(string challenge = default(string), HydraOAuth2Client _client = default(HydraOAuth2Client), string requestUrl = default(string), bool rpInitiated = default(bool), string sid = default(string), string subject = default(string))
 {
     this.Challenge            = challenge;
     this._Client              = _client;
     this.RequestUrl           = requestUrl;
     this.RpInitiated          = rpInitiated;
     this.Sid                  = sid;
     this.Subject              = subject;
     this.AdditionalProperties = new Dictionary <string, object>();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HydraLoginRequest" /> class.
 /// </summary>
 /// <param name="challenge">ID is the identifier (\&quot;login challenge\&quot;) of the login request. It is used to identify the session. (required).</param>
 /// <param name="_client">_client (required).</param>
 /// <param name="oidcContext">oidcContext.</param>
 /// <param name="requestUrl">RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters. (required).</param>
 /// <param name="requestedAccessTokenAudience">requestedAccessTokenAudience (required).</param>
 /// <param name="requestedScope">requestedScope (required).</param>
 /// <param name="sessionId">SessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \&quot;sid\&quot; parameter in the ID Token and in OIDC Front-/Back- channel logout. It&#39;s value can generally be used to associate consecutive login requests by a certain user..</param>
 /// <param name="skip">Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you can skip asking the user to grant the requested scopes, and simply forward the user to the redirect URL.  This feature allows you to update / set session information. (required).</param>
 /// <param name="subject">Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client. If this value is set and &#x60;skip&#x60; is true, you MUST include this subject type when accepting the login request, or the request will fail. (required).</param>
 public HydraLoginRequest(string challenge = default(string), HydraOAuth2Client _client = default(HydraOAuth2Client), HydraOpenIDConnectContext oidcContext = default(HydraOpenIDConnectContext), string requestUrl = default(string), List <string> requestedAccessTokenAudience = default(List <string>), List <string> requestedScope = default(List <string>), string sessionId = default(string), bool skip = default(bool), string subject = default(string))
 {
     // to ensure "challenge" is required (not null)
     this.Challenge = challenge ?? throw new ArgumentNullException("challenge is a required property for HydraLoginRequest and cannot be null");
     // to ensure "_client" is required (not null)
     this._Client = _client ?? throw new ArgumentNullException("_client is a required property for HydraLoginRequest and cannot be null");
     // to ensure "requestUrl" is required (not null)
     this.RequestUrl = requestUrl ?? throw new ArgumentNullException("requestUrl is a required property for HydraLoginRequest and cannot be null");
     // to ensure "requestedAccessTokenAudience" is required (not null)
     this.RequestedAccessTokenAudience = requestedAccessTokenAudience ?? throw new ArgumentNullException("requestedAccessTokenAudience is a required property for HydraLoginRequest and cannot be null");
     // to ensure "requestedScope" is required (not null)
     this.RequestedScope = requestedScope ?? throw new ArgumentNullException("requestedScope is a required property for HydraLoginRequest and cannot be null");
     this.Skip           = skip;
     // to ensure "subject" is required (not null)
     this.Subject     = subject ?? throw new ArgumentNullException("subject is a required property for HydraLoginRequest and cannot be null");
     this.OidcContext = oidcContext;
     this.SessionId   = sessionId;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HydraConsentRequest" /> class.
 /// </summary>
 /// <param name="acr">ACR represents the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication..</param>
 /// <param name="challenge">ID is the identifier (\&quot;authorization challenge\&quot;) of the consent authorization request. It is used to identify the session. (required).</param>
 /// <param name="_client">_client.</param>
 /// <param name="context">context.</param>
 /// <param name="loginChallenge">LoginChallenge is the login challenge this consent challenge belongs to. It can be used to associate a login and consent request in the login &amp; consent app..</param>
 /// <param name="loginSessionId">LoginSessionID is the login session ID. If the user-agent reuses a login session (via cookie / remember flag) this ID will remain the same. If the user-agent did not have an existing authentication session (e.g. remember is false) this will be a new random value. This value is used as the \&quot;sid\&quot; parameter in the ID Token and in OIDC Front-/Back- channel logout. It&#39;s value can generally be used to associate consecutive login requests by a certain user..</param>
 /// <param name="oidcContext">oidcContext.</param>
 /// <param name="requestUrl">RequestURL is the original OAuth 2.0 Authorization URL requested by the OAuth 2.0 client. It is the URL which initiates the OAuth 2.0 Authorization Code or OAuth 2.0 Implicit flow. This URL is typically not needed, but might come in handy if you want to deal with additional request parameters..</param>
 /// <param name="requestedAccessTokenAudience">requestedAccessTokenAudience.</param>
 /// <param name="requestedScope">requestedScope.</param>
 /// <param name="skip">Skip, if true, implies that the client has requested the same scopes from the same user previously. If true, you must not ask the user to grant the requested scopes. You must however either allow or deny the consent request using the usual API call..</param>
 /// <param name="subject">Subject is the user ID of the end-user that authenticated. Now, that end user needs to grant or deny the scope requested by the OAuth 2.0 client..</param>
 public HydraConsentRequest(string acr = default(string), string challenge = default(string), HydraOAuth2Client _client = default(HydraOAuth2Client), Object context = default(Object), string loginChallenge = default(string), string loginSessionId = default(string), HydraOpenIDConnectContext oidcContext = default(HydraOpenIDConnectContext), string requestUrl = default(string), List <string> requestedAccessTokenAudience = default(List <string>), List <string> requestedScope = default(List <string>), bool skip = default(bool), string subject = default(string))
 {
     // to ensure "challenge" is required (not null)
     this.Challenge      = challenge ?? throw new ArgumentNullException("challenge is a required property for HydraConsentRequest and cannot be null");
     this.Acr            = acr;
     this._Client        = _client;
     this.Context        = context;
     this.LoginChallenge = loginChallenge;
     this.LoginSessionId = loginSessionId;
     this.OidcContext    = oidcContext;
     this.RequestUrl     = requestUrl;
     this.RequestedAccessTokenAudience = requestedAccessTokenAudience;
     this.RequestedScope = requestedScope;
     this.Skip           = skip;
     this.Subject        = subject;
 }