xavehoo
/
XAF_how-to-use-google-facebook-and-microsoft-accounts-in-aspnet-xaf-applications-oauth2-demo-t535280
Public
forked from DevExpress-Examples/xaf-web-forms-use-oauth2-authentication-providers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OAuthUser.vb
68 lines (65 loc) · 2.45 KB
/
OAuthUser.vb
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Imports Microsoft.VisualBasic
Imports DevExpress.Persistent.BaseImpl.PermissionPolicy
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Threading.Tasks
Imports DevExpress.Xpo
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
Namespace AuthenticationOwin.Module.BusinessObjects
Public Class OAuthUser
Inherits PermissionPolicyUser
Implements IAuthenticationOAuthUser
Public Property EnableStandardAuthentication() As Boolean Implements IAuthenticationOAuthUser.EnableStandardAuthentication
Get
Return GetPropertyValue(Of Boolean)("EnableStandardAuthentication")
End Get
Set(ByVal value As Boolean)
SetPropertyValue("EnableStandardAuthentication", value)
End Set
End Property
<Association, Aggregated>
Public ReadOnly Property OAuthAuthenticationEmails() As XPCollection(Of EmailEntity) Implements IAuthenticationOAuthUser.OAuthAuthenticationEmails
Get
Return GetCollection(Of EmailEntity)("OAuthAuthenticationEmails")
End Get
End Property
Private Property IAuthenticationOAuthUser_UserName As String Implements IAuthenticationOAuthUser.UserName
Get
Return UserName
End Get
Set(value As String)
UserName = value
End Set
End Property
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
End Class
Public Class EmailEntity
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
<RuleUniqueValue("Unique_Email", DefaultContexts.Save, CriteriaEvaluationBehavior:=CriteriaEvaluationBehavior.BeforeTransaction)>
Public Property Email() As String
Get
Return GetPropertyValue(Of String)("Email")
End Get
Set(ByVal value As String)
SetPropertyValue("Email", value)
End Set
End Property
<Association>
Public Property OAuthUser() As OAuthUser
Get
Return GetPropertyValue(Of OAuthUser)("OAuthUser")
End Get
Set(ByVal value As OAuthUser)
SetPropertyValue("OAuthUser", value)
End Set
End Property
End Class
End Namespace