|
6 | 6 | /// <summary> |
7 | 7 | /// Used for building mocked <see cref="ClaimsIdentity"/>. |
8 | 8 | /// </summary> |
9 | | - public interface IClaimsIdentityBuilder |
| 9 | + public interface IWithClaimsIdentityBuilder |
10 | 10 | { |
11 | 11 | /// <summary> |
12 | 12 | /// Sets type of the username claim. Default is <see cref="ClaimTypes.Name"/>. |
13 | 13 | /// </summary> |
14 | 14 | /// <param name="nameType">Type to set on the username claim.</param> |
15 | | - /// <returns>The same <see cref="IAndClaimsIdentityBuilder"/>.</returns> |
16 | | - IAndClaimsIdentityBuilder WithNameType(string nameType); |
| 15 | + /// <returns>The same <see cref="IAndWithClaimsIdentityBuilder"/>.</returns> |
| 16 | + IAndWithClaimsIdentityBuilder WithNameType(string nameType); |
17 | 17 |
|
18 | 18 | /// <summary> |
19 | 19 | /// Sets type of the role claim. Default is <see cref="ClaimTypes.Role"/>. |
20 | 20 | /// </summary> |
21 | 21 | /// <param name="roleType">Type to set on the role claim.</param> |
22 | | - /// <returns>The same <see cref="IAndClaimsIdentityBuilder"/>.</returns> |
23 | | - IAndClaimsIdentityBuilder WithRoleType(string roleType); |
| 22 | + /// <returns>The same <see cref="IAndWithClaimsIdentityBuilder"/>.</returns> |
| 23 | + IAndWithClaimsIdentityBuilder WithRoleType(string roleType); |
24 | 24 |
|
25 | 25 | /// <summary> |
26 | 26 | /// Sets identifier claim to the built <see cref="ClaimsIdentity"/>. If such is not provided, "TestId" is used by default. |
27 | 27 | /// </summary> |
28 | 28 | /// <param name="identifier">Value of the identifier claim - <see cref="ClaimTypes.NameIdentifier"/>.</param> |
29 | | - /// <returns>The same <see cref="IAndClaimsIdentityBuilder"/>.</returns> |
30 | | - IAndClaimsIdentityBuilder WithIdentifier(string identifier); |
| 29 | + /// <returns>The same <see cref="IAndWithClaimsIdentityBuilder"/>.</returns> |
| 30 | + IAndWithClaimsIdentityBuilder WithIdentifier(string identifier); |
31 | 31 |
|
32 | 32 | /// <summary> |
33 | 33 | /// Sets username claims to the built <see cref="ClaimsIdentity"/>. If such is not provided, "TestUser" is used by default. |
34 | 34 | /// </summary> |
35 | 35 | /// <param name="username">Value of the username claim. Default claim type is <see cref="ClaimTypes.Name"/>.</param> |
36 | | - /// <returns>The same <see cref="IAndClaimsIdentityBuilder"/>.</returns> |
37 | | - IAndClaimsIdentityBuilder WithUsername(string username); |
| 36 | + /// <returns>The same <see cref="IAndWithClaimsIdentityBuilder"/>.</returns> |
| 37 | + IAndWithClaimsIdentityBuilder WithUsername(string username); |
38 | 38 |
|
39 | 39 | /// <summary> |
40 | 40 | /// Adds claim to the built <see cref="ClaimsIdentity"/>. |
41 | 41 | /// </summary> |
42 | 42 | /// <param name="type">Type of the <see cref="Claim"/> to add.</param> |
43 | 43 | /// <param name="value">Value of the <see cref="Claim"/> to add.</param> |
44 | | - /// <returns>The same <see cref="IAndClaimsIdentityBuilder"/>.</returns> |
45 | | - IAndClaimsIdentityBuilder WithClaim(string type, string value); |
| 44 | + /// <returns>The same <see cref="IAndWithClaimsIdentityBuilder"/>.</returns> |
| 45 | + IAndWithClaimsIdentityBuilder WithClaim(string type, string value); |
46 | 46 |
|
47 | 47 | /// <summary> |
48 | 48 | /// Adds claim to the built <see cref="ClaimsIdentity"/>. |
49 | 49 | /// </summary> |
50 | 50 | /// <param name="claim">The <see cref="Claim"/> to add.</param> |
51 | | - /// <returns>The same <see cref="IAndClaimsIdentityBuilder"/>.</returns> |
52 | | - IAndClaimsIdentityBuilder WithClaim(Claim claim); |
| 51 | + /// <returns>The same <see cref="IAndWithClaimsIdentityBuilder"/>.</returns> |
| 52 | + IAndWithClaimsIdentityBuilder WithClaim(Claim claim); |
53 | 53 |
|
54 | 54 | /// <summary> |
55 | 55 | /// Adds claims to the built <see cref="ClaimsIdentity"/>. |
56 | 56 | /// </summary> |
57 | 57 | /// <param name="claims">Collection of <see cref="Claim"/> to add.</param> |
58 | | - /// <returns>The same <see cref="IAndClaimsIdentityBuilder"/>.</returns> |
59 | | - IAndClaimsIdentityBuilder WithClaims(IEnumerable<Claim> claims); |
| 58 | + /// <returns>The same <see cref="IAndWithClaimsIdentityBuilder"/>.</returns> |
| 59 | + IAndWithClaimsIdentityBuilder WithClaims(IEnumerable<Claim> claims); |
60 | 60 |
|
61 | 61 | /// <summary> |
62 | 62 | /// Adds claims to the built <see cref="ClaimsIdentity"/>. |
63 | 63 | /// </summary> |
64 | 64 | /// <param name="claims"><see cref="Claim"/> parameters to add.</param> |
65 | | - /// <returns>The same <see cref="IAndClaimsIdentityBuilder"/>.</returns> |
66 | | - IAndClaimsIdentityBuilder WithClaims(params Claim[] claims); |
| 65 | + /// <returns>The same <see cref="IAndWithClaimsIdentityBuilder"/>.</returns> |
| 66 | + IAndWithClaimsIdentityBuilder WithClaims(params Claim[] claims); |
67 | 67 |
|
68 | 68 | /// <summary> |
69 | 69 | /// Adds authentication type to the built <see cref="ClaimsIdentity"/>. If such is not provided, "Passport" is used by default. |
70 | 70 | /// </summary> |
71 | 71 | /// <param name="authenticationType">Authentication type to add.</param> |
72 | | - /// <returns>The same <see cref="IAndClaimsIdentityBuilder"/>.</returns> |
73 | | - IAndClaimsIdentityBuilder WithAuthenticationType(string authenticationType); |
| 72 | + /// <returns>The same <see cref="IAndWithClaimsIdentityBuilder"/>.</returns> |
| 73 | + IAndWithClaimsIdentityBuilder WithAuthenticationType(string authenticationType); |
74 | 74 |
|
75 | 75 | /// <summary> |
76 | 76 | /// Adds role to the built <see cref="ClaimsIdentity"/>. |
77 | 77 | /// </summary> |
78 | 78 | /// <param name="role">Value of the role claim. Default claim type is <see cref="ClaimTypes.Role"/>.</param> |
79 | | - /// <returns>The same <see cref="IAndClaimsIdentityBuilder"/>.</returns> |
80 | | - IAndClaimsIdentityBuilder InRole(string role); |
| 79 | + /// <returns>The same <see cref="IAndWithClaimsIdentityBuilder"/>.</returns> |
| 80 | + IAndWithClaimsIdentityBuilder InRole(string role); |
81 | 81 |
|
82 | 82 | /// <summary> |
83 | 83 | /// Adds roles to the built <see cref="ClaimsIdentity"/>. |
84 | 84 | /// </summary> |
85 | 85 | /// <param name="roles">Collection of role names to add.</param> |
86 | | - /// <returns>The same <see cref="IAndClaimsIdentityBuilder"/>.</returns> |
87 | | - IAndClaimsIdentityBuilder InRoles(IEnumerable<string> roles); |
| 86 | + /// <returns>The same <see cref="IAndWithClaimsIdentityBuilder"/>.</returns> |
| 87 | + IAndWithClaimsIdentityBuilder InRoles(IEnumerable<string> roles); |
88 | 88 |
|
89 | 89 | /// <summary> |
90 | 90 | /// Adds roles to the built <see cref="ClaimsIdentity"/>. |
91 | 91 | /// </summary> |
92 | 92 | /// <param name="roles">Role name parameters to add.</param> |
93 | | - /// <returns>The same <see cref="IAndClaimsIdentityBuilder"/>.</returns> |
94 | | - IAndClaimsIdentityBuilder InRoles(params string[] roles); |
| 93 | + /// <returns>The same <see cref="IAndWithClaimsIdentityBuilder"/>.</returns> |
| 94 | + IAndWithClaimsIdentityBuilder InRoles(params string[] roles); |
95 | 95 | } |
96 | 96 | } |
0 commit comments