/
WebConfiguration.cs
118 lines (102 loc) · 4.66 KB
/
WebConfiguration.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// <copyright file="WebConfiguration.cs" company="Stormpath, Inc.">
// Copyright (c) 2016 Stormpath, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
using System;
using System.Collections.Generic;
namespace Stormpath.Configuration.Abstractions
{
/// <summary>
/// Represents web framework integration configuration options.
/// </summary>
public sealed class WebConfiguration
{
/// <summary>
/// The web server's base URI.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.serverUri</c></remarks>
public string ServerUri { get; set; } = Default.Configuration.Web.ServerUri;
/// <summary>
/// The web application's base path.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.basePath</c></remarks>
public string BasePath { get; set; } = Default.Configuration.Web.BasePath;
/// <summary>
/// The OAuth2 route configuration.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.oauth2</c></remarks>
public WebOauth2RouteConfiguration Oauth2 { get; set; }
/// <summary>
/// The access token cookie configuration.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.accessTokenCookie</c></remarks>
public WebCookieConfiguration AccessTokenCookie { get; set; }
/// <summary>
/// The refresh token cookie configuration.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.refreshTokenCookie</c></remarks>
public WebRefreshTokenCookieConfiguration RefreshTokenCookie { get; set; }
/// <summary>
/// The output types configuration.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.produces</c></remarks>
public IReadOnlyList<string> Produces { get; set; }
/// <summary>
/// The Register route configuration.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.register</c></remarks>
public WebRegisterRouteConfiguration Register { get; set; }
/// <summary>
/// The Verify Email route configuration.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.verifyEmail</c></remarks>
public WebVerifyEmailRouteConfiguration VerifyEmail { get; set; }
/// <summary>
/// The Login route configuration.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.login</c></remarks>
public WebLoginRouteConfiguration Login { get; set; }
/// <summary>
/// The Logout route configuration.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.logout</c></remarks>
public WebLogoutRouteConfiguration Logout { get; set; }
/// <summary>
/// The Forgot Password route configuration
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.forgotPassword</c></remarks>
public WebForgotPasswordRouteConfiguration ForgotPassword { get; set; }
/// <summary>
/// The Change Password route configuration.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.changePassword</c></remarks>
public WebChangePasswordRouteConfiguration ChangePassword { get; set; }
/// <summary>
/// The Stormpath callback route configuration.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.callback</c></remarks>
public WebCallbackRouteConfiguration Callback { get; set; }
/// <summary>
/// The social providers configuration.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.social</c></remarks>
public IReadOnlyDictionary<string, WebSocialProviderConfiguration> Social { get; set; }
= new Dictionary<string, WebSocialProviderConfiguration>(StringComparer.OrdinalIgnoreCase);
/// <summary>
/// The Me route configuration.
/// </summary>
/// <remarks>Configuration path: <c>stormpath.web.me</c></remarks>
public WebMeRouteConfiguration Me { get; set; }
}
}