Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ClaimsIdentity() [9/13]

System.Security.Claims.ClaimsIdentity.ClaimsIdentity ( IIdentity? identity,
IEnumerable< Claim >? claims,
string? authenticationType,
string? nameType,
string? roleType )
inline

Definition at line 163 of file ClaimsIdentity.cs.

164 {
166 _authenticationType = ((identity != null && string.IsNullOrEmpty(authenticationType)) ? identity.AuthenticationType : authenticationType);
167 _nameClaimType = ((!string.IsNullOrEmpty(nameType)) ? nameType : ((claimsIdentity != null) ? claimsIdentity._nameClaimType : "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"));
168 _roleClaimType = ((!string.IsNullOrEmpty(roleType)) ? roleType : ((claimsIdentity != null) ? claimsIdentity._roleClaimType : "http://schemas.microsoft.com/ws/2008/06/identity/claims/role"));
169 if (claimsIdentity != null)
170 {
171 _label = claimsIdentity._label;
172 _bootstrapContext = claimsIdentity._bootstrapContext;
173 if (claimsIdentity.Actor != null)
174 {
175 if (IsCircular(claimsIdentity.Actor))
176 {
178 }
179 _actor = claimsIdentity.Actor;
180 }
181 SafeAddClaims(claimsIdentity._instanceClaims);
182 }
183 else if (identity != null && !string.IsNullOrEmpty(identity.Name))
184 {
185 SafeAddClaim(new Claim(_nameClaimType, identity.Name, "http://www.w3.org/2001/XMLSchema#string", "LOCAL AUTHORITY", "LOCAL AUTHORITY", this));
186 }
187 if (claims != null)
188 {
190 }
191 }
static string InvalidOperationException_ActorGraphCircular
Definition SR.cs:16
Definition SR.cs:7
void SafeAddClaims(IEnumerable< Claim > claims)
bool IsCircular(ClaimsIdentity subject)

References System.Security.Claims.ClaimsIdentity.ClaimsIdentity(), System.Security.Claims.ClaimsIdentity._actor, System.Security.Claims.ClaimsIdentity._authenticationType, System.Security.Claims.ClaimsIdentity._bootstrapContext, System.Security.Claims.ClaimsIdentity._label, System.Security.Claims.ClaimsIdentity._nameClaimType, System.Security.Claims.ClaimsIdentity._roleClaimType, System.Security.Principal.IIdentity.AuthenticationType, System.Runtime.Serialization.Dictionary, System.SR.InvalidOperationException_ActorGraphCircular, System.Security.Claims.ClaimsIdentity.IsCircular(), System.Security.Principal.IIdentity.Name, System.Security.Claims.ClaimsIdentity.SafeAddClaim(), and System.Security.Claims.ClaimsIdentity.SafeAddClaims().