forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServiceStack_UserAuth_ByOAuthProvider.cs
More file actions
30 lines (28 loc) · 1.11 KB
/
ServiceStack_UserAuth_ByOAuthProvider.cs
File metadata and controls
30 lines (28 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Linq;
using Raven.Client.Indexes;
using ServiceStack.Auth;
namespace ServiceStack.Authentication.RavenDb
{
public class ServiceStack_UserAuth_ByOAuthProvider : AbstractIndexCreationTask<UserAuthDetails, ServiceStack_UserAuth_ByOAuthProvider.Result>
{
public class Result
{
public string Provider { get; set; }
public string UserId { get; set; }
public int UserAuthId { get; set; }
public DateTime ModifiedDate { get; set; }
}
public ServiceStack_UserAuth_ByOAuthProvider()
{
Map = oauthProviders => from oauthProvider in oauthProviders
select new Result
{
Provider = oauthProvider.Provider,
UserId = oauthProvider.UserId,
ModifiedDate = oauthProvider.ModifiedDate,
UserAuthId = oauthProvider.UserAuthId
};
}
}
}