I anticipated creating a single interface which implements both the
'sub' interfaces. This solves the dependency issue, and also means the
existing Repository implementations don't need to change.
I've already had a look at the code. The 'verfication' interface needs
only these:
bool TryAuthenticate(string userName, string password, out
string userId);
void LoadUserAuth(IAuthSession session, IOAuthTokens tokens);
void SaveUserAuth(IAuthSession authSession);//I'm not sure how
well named this method is
string CreateOrMergeAuthSession(IAuthSession authSession,
IOAuthTokens tokens);
I'll have a think about the names, though I'm not sure I'd come up
with anything better than the ones you've suggested.
In the interim, I used the name IUserAuthReadRepository.
The other changes include:
AuthProvider.protected virtual void SaveUserAuth(IServiceBase
authService, IAuthSession session, IUserAuthReadRepository authRepo,
IOAuthTokens tokens)
and:
public virtual bool TryAuthenticate(IServiceBase authService, string
userName, string password)
{
var authRepo = authService.TryResolve<IUserAuthReadRepository>();
//Rest of method the same
}
Thanks for the assistance!