/// <summary> /// Creates a new instance of the <see cref="ValidateCryptographyRequestContext"/> class. /// </summary> public ValidateCryptographyRequestContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, OpenIdConnectRequest request) : base(context, scheme, options, request) { Validate(); }
/// <summary> /// Creates a new instance of the <see cref="BaseValidatingClientContext"/> class. /// </summary> protected BaseValidatingClientContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, OpenIdConnectRequest request) : base(context, scheme, options, request) { ClientId = request.ClientId; }
/// <summary> /// Creates a new instance of the <see cref="ExtractIntrospectionRequestContext"/> class. /// </summary> public ExtractIntrospectionRequestContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, OpenIdConnectRequest request) : base(context, scheme, options, request) { Validate(); }
/// <summary> /// Creates a new instance of the <see cref="HandleAuthorizationRequestContext"/> class. /// </summary> public HandleAuthorizationRequestContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, OpenIdConnectRequest request) : base(context, scheme, options, request, null) { Validate(); }
/// <summary> /// Creates a new instance of the <see cref="ValidateAuthorizationRequestContext"/> class. /// </summary> public ValidateAuthorizationRequestContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, OpenIdConnectRequest request) : base(context, scheme, options, request) { RedirectUri = request.RedirectUri; }
/// <summary> /// Creates a new instance of the <see cref="DeserializeAuthorizationCodeContext"/> class. /// </summary> public DeserializeAuthorizationCodeContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, OpenIdConnectRequest request, string code) : base(context, scheme, options, request) { AuthorizationCode = code; }
/// <summary> /// Creates a new instance of the <see cref="SerializeAccessTokenContext"/> class. /// </summary> public SerializeAccessTokenContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, OpenIdConnectRequest request, OpenIdConnectResponse response, AuthenticationTicket ticket) : base(context, scheme, options, request, response, ticket) { }
/// <summary> /// Creates a new instance of the <see cref="DeserializeIdentityTokenContext"/> class. /// </summary> public DeserializeIdentityTokenContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, OpenIdConnectRequest request, string token) : base(context, scheme, options, request) { IdentityToken = token; }
/// <summary> /// Creates a new instance of the <see cref="BaseValidatingTicketContext"/> class. /// </summary> protected BaseValidatingTicketContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, OpenIdConnectRequest request, AuthenticationTicket ticket) : base(context, scheme, options, request) { Ticket = ticket; }
/// <summary> /// Creates a new instance of the <see cref="HandleTokenRequestContext"/> class. /// </summary> public HandleTokenRequestContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, OpenIdConnectRequest request, AuthenticationTicket ticket) : base(context, scheme, options, request, ticket) { Validate(); }
/// <summary> /// Creates a new instance of the <see cref="ProcessSigninResponseContext"/> class. /// </summary> public ProcessSigninResponseContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, AuthenticationTicket ticket, OpenIdConnectRequest request, OpenIdConnectResponse response) : base(context, scheme, options, request, ticket) { Validate(); Response = response; }
/// <summary> /// Creates a new instance of the <see cref="ProcessChallengeResponseContext"/> class. /// </summary> public ProcessChallengeResponseContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, AuthenticationProperties properties, OpenIdConnectRequest request, OpenIdConnectResponse response) : base(context, scheme, options, request) { Validate(); Properties = properties; Response = response; }
public static string GetIssuer(this HttpContext context, OpenIdConnectServerOptions options) { var issuer = options.Issuer; if (issuer == null) { if (!Uri.TryCreate(context.Request.Scheme + "://" + context.Request.Host + context.Request.PathBase, UriKind.Absolute, out issuer)) { throw new InvalidOperationException("The issuer address cannot be inferred from the current request"); } } return(issuer.AbsoluteUri); }
/// <summary> /// Creates a new instance of the <see cref="ValidateLogoutRequestContext"/> class. /// </summary> public ValidateLogoutRequestContext( HttpContext context, AuthenticationScheme scheme, OpenIdConnectServerOptions options, OpenIdConnectRequest request) : base(context, scheme, options, request) { // Note: if the optional post_logout_redirect_uri parameter // is missing, mark the validation context as validated. // See http://openid.net/specs/openid-connect-session-1_0.html#RPLogout if (string.IsNullOrEmpty(request.PostLogoutRedirectUri)) { Validate(); } PostLogoutRedirectUri = request.PostLogoutRedirectUri; }