 | SecurityExtensionsGetFirstClaimValue(IClaimsIdentity, String) Method |
Gets the first claim value out of an
IClaimsIdentity searching in the order of claim types provided in the
claimTypes parameters.
Namespace: SanteDB.Core.SecurityAssembly: SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.2081-alpha+b4ae72647f2cc271f89142f76fff26ad69e00f5a
Syntaxpublic static string GetFirstClaimValue(
this IClaimsIdentity identity,
params string[] claimTypes
)
<ExtensionAttribute>
Public Shared Function GetFirstClaimValue (
identity As IClaimsIdentity,
ParamArray claimTypes As String()
) As String
public:
[ExtensionAttribute]
static String^ GetFirstClaimValue(
IClaimsIdentity^ identity,
... array<String^>^ claimTypes
)
[<ExtensionAttribute>]
static member GetFirstClaimValue :
identity : IClaimsIdentity *
claimTypes : string[] -> string Parameters
- identity IClaimsIdentity
- The identity to search
- claimTypes String
- the claim types to search
Return Value
StringA value for the first instance of the first claim type found or null.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IClaimsIdentity. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also