WIF use of Private WCF Methods
WIF uses reflection to access private WCF members in the following methods:
-
FederatedSecurityTokenManager.SetWrappedTokenCache. WCF lets a
developer replace the
SecurityContextToken
cache by returning the cache as an out of band token resolver fromCreateSecurityTokenAuthenticator
. However, this cache does not correctly replace the inner cache in theAuthenticators
internal property, so WIF adds the cache using reflection.
-
FederatedSecurityTokenManager.GetSecurityVersion. The
SecurityTokenVersion
for the twoMessageSecurityVersions
"WSSecurity10WSTrust13WSSecureConversation13BasicSecurityProfile10" and "WSSecurity11WSTrust13WSSecureConversation13" indicates the wrong Security version specification in the Security Specification collection. WIF uses reflection to access the correctSecurityVersion
by casting the givenSecurityTokenVersion
to the internalMessageSecurityTokenVersion
.
-
WrappedSessionSecurityTokenAuthenticator.ReplaceAuthPolicies. WIF
implements its claims model through token validation. However, due
to the strict internal implementation in WCF regarding
SecurityContextToken
authentication and creation, WIF allows WCF to create theSecurityContextToken
and then uses reflection replace the internalAuthorizationPolicies
in the token.
The WIF methods listed previously are themselves private and should not be called.