-
Notifications
You must be signed in to change notification settings - Fork 26
/
cLibOAuth.QS.asp
115 lines (98 loc) · 3.45 KB
/
cLibOAuth.QS.asp
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<%
'******************************************************************************
' CLASS: cLibOAuthQS
' PURPOSE:
'
' AUTHOR: sdesapio DATE: 04.04.10 LAST MODIFIED: 04.04.10
'******************************************************************************
Class cLibOAuthQS
'**************************************************************************
'***'PRIVATE CLASS MEMBERS
'**************************************************************************
Private m_objDictionary
Private m_objUtils
Private m_strSorted
'**************************************************************************
'***'CLASS_INITIALIZE / CLASS_TERMINATE
'**************************************************************************
Private Sub Class_Initialize()
Set m_objDictionary = Nothing
Set m_objUtils = Nothing
m_strSorted = Null
End Sub
Private Sub Class_Terminate()
Set m_objUtils = Nothing
Set m_objDictionary = Nothing
End Sub
'**************************************************************************
'***'PUBLIC PROPERTIES
'**************************************************************************
'**************************************************************************
'***'PRIVATE PROPERTIES
'**************************************************************************
Private Property Get Dictionary
If m_objDictionary Is Nothing Then
Set m_objDictionary = Server.CreateObject("Scripting.Dictionary")
End If
Set Dictionary = m_objDictionary
End Property
Private Property Get Sorted
If IsNull(m_strSorted) Then
Call Get_Sorted()
End If
Sorted = m_strSorted
End Property
Private Property Get Utils
If m_objUtils Is Nothing Then
Set m_objUtils = New cLibOAuthUtils
End If
Set Utils = m_objUtils
End Property
'**************************************************************************
'***'PUBLIC FUNCTIONS
'**************************************************************************
'**************************************************************************
' SUB: Add
' PARAMETERS:
' PURPOSE:
'
' AUTHOR: sdesapio DATE: 04.04.10 LAST MODIFIED: 04.04.10
'**************************************************************************
Public Sub Add(strKey, strValue)
Dictionary.Add strKey, Utils.URLEncode(strValue)
End Sub
'**************************************************************************
' SUB: Get_Parameters
' PARAMETERS:
' PURPOSE:
'
' AUTHOR: sdesapio DATE: 04.04.10 LAST MODIFIED: 04.04.10
'**************************************************************************
Public Function Get_Parameters()
Get_Parameters = Sorted
End Function
'**************************************************************************
'***'PRIVATE FUNCTIONS
'**************************************************************************
'**************************************************************************
' SUB: Get_Sorted
' PARAMETERS:
' PURPOSE:
'
' AUTHOR: sdesapio DATE: 04.04.10 LAST MODIFIED: 04.04.10
'**************************************************************************
Private Sub Get_Sorted()
Dim intCount : intCount = Dictionary.Count
Dim i : i = 1
m_strSorted = ""
Call Utils.SortDictionary(Dictionary, 1)
Dim Item : For Each Item In Dictionary
m_strSorted = m_strSorted & Item & "=" & Dictionary.Item(Item)
If i < intCount Then
m_strSorted = m_strSorted & "&"
End If
i = i + 1
Next
End Sub
End Class
%>