Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Added user mapping to Tokenizer #1567

Merged
merged 6 commits into from
Aug 3, 2014

Conversation

khellang
Copy link
Member

Fixes #1566

This PR adds an equivalent to the forms authentication IUserMapper to allow users to provide a custom IUserIdentity implementation.

I'm not sure that IUserMapper is the best name though, since this doesn't map a Guid to an identity, but rather just creates an identity based on username and claims.
Any suggestions? IUserIdentityFactory? IUserIdentityProvider? IUserIdentityResolver?

@khellang khellang added this to the 1.0Alpha milestone Jun 13, 2014
@vincentparrett
Copy link

Looks good, I would go with IUserIdentityProvider,

@phillip-haydon
Copy link
Member

Factory is a terrible name for this.

I feel it's more of a Resolver than a Provider... The provider is more the implementation rather than... a resolver which is just resolving the user for the request...

I think it should be Resolver.


using Nancy.Security;

internal class DefaultUserMapper : IUserMapper
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why internal?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class + members are missing XML comments

@thecodejunkie
Copy link
Member

I think xxResolver is a good name

@khellang
Copy link
Member Author

khellang commented Aug 3, 2014

This should be good to go now 😄

thecodejunkie added a commit that referenced this pull request Aug 3, 2014
@thecodejunkie thecodejunkie merged commit 943ad6d into NancyFx:master Aug 3, 2014
@thecodejunkie
Copy link
Member

👍

Don't forget the Update Documentation label 😸

@vincentparrett
Copy link

Excellent, thanks guys.

@khellang khellang deleted the feature/tokenize-user-mapper branch August 4, 2014 08:50
@grumpydev grumpydev modified the milestones: 1.0 Alpha, 1.0 Feb 4, 2015
@khellang khellang restored the feature/tokenize-user-mapper branch February 20, 2015 12:08
@khellang khellang deleted the feature/tokenize-user-mapper branch February 20, 2015 12:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Token Authentication hard codes IUserIdentity implementation
5 participants