StarterSTS uses a number of internal "mini" provider to componentize the work. These providers abstract away some of the details in the following areas: certificate loading, providing claims and display tokens, relying party management and mapping of user credentials.
Below you'll find a description of every provider and information on how to customize them.
Every provider feature consists of the following pieces:
The certificate provider encapsulates the details how the necessary certificates for the STS are loaded. The default implementation loads certificates using the certificateReferences configuration section.
public abstract
class
CertificateProviderBase
{
public abstract
X509Certificate2 Get(string name);
}
The Get method must be able to resolve well-known strings like SigningCertificate, SSL and BridgedSigngingCertificate.
Specify the type that implements the custom provider in the certificateProvider attribute in starterSTS.config.
The certificate provider encapsulates the compilation of claim metadata and value. It has three jobs:
public abstract
class
ClaimsProviderBase
{
public abstract
IClaimsIdentity GetClaims(PolicyOptions options,
IClaimsPrincipal principal);
public abstract
List<DisplayClaim>
GetDisplayClaims();
public abstract
DisplayToken GetDisplayToken(string requestedDisplayTokenLanguage,
IClaimsIdentity subject);
}
Specify the type that implements the custom provider in the claimsProvider attribute in starterSTS.config.
This provider encapsulates the details of how relying parties are stored, and how their information is retrieved at runtime. The provider has only a single method which returns a RelyingParty object, when the relying party is registered.
public abstract
class
RelyingPartyProviderBase
{
public abstract
bool TryGet(string
realm, out
RelyingParty relyingParty);
}
Specify the type that implements the custom provider in the relyingPartyProvider attribute in starterSTS.config.
This provider encapsulates the client certificate thumbprint to user (ande vice versa) mapping.
public abstract
class UserMapperBase
{
public abstract
bool TryGetUserNameFromThumbprint(string thumbprint, out
string userName);
public abstract
bool TryGetThumbprintsForUser(string userName, out
List<string>
thumbprints);
}
Specify the type that implements the custom provider in the userMapper attribute in starterSTS.config.