I’ve browsed the documentation on DotNetOpenAuth and cannot find a method to retrieve the authentication provider type based off of the ClaimedIdentifier. I’m looking for a method akin to the following:
ProviderType providerType = ClaimedIdentifier.Parse(" .... ").Type;
Is there a method to retrieve the Provider Type?
It’d be great to query DotNetOpenAuth to retrieve this information instead of maintaining a state variable in the application or passing the type as a query string parameter. Though, it is looking like this might be necessary…
Don’t parse the Claimed Identifier to try to figure out the provider. While that may work for the common case, there are valid cases where that would fail and you might also be opening yourself for attack.
You acquire the ClaimedIdentifier from an instance of
IAuthenticationRequest. This interface also has aProviderproperty that returns anIProviderEndpointinstance with aUriproperty on it. This Uri property is how you should recognize Providers that you are particularly interested in. So for example:I hope this helps.