├── LICENSE
├── OAuthForms1
├── .vs
│ ├── OAuthForms1
│ │ └── v14
│ │ │ └── .suo
│ └── config
│ │ └── applicationhost.config
├── OAuthForms1.sln
├── OAuthForms1
│ ├── OAuthForms1.Droid
│ │ ├── Assets
│ │ │ └── AboutAssets.txt
│ │ ├── MainActivity.cs
│ │ ├── OAuthForms1.Droid.csproj
│ │ ├── OAuthForms1.Droid.csproj.user
│ │ ├── Properties
│ │ │ ├── AndroidManifest.xml
│ │ │ └── AssemblyInfo.cs
│ │ ├── Resources
│ │ │ ├── AboutResources.txt
│ │ │ ├── Resource.Designer.cs
│ │ │ ├── drawable-hdpi
│ │ │ │ └── icon.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ └── icon.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ └── icon.png
│ │ │ └── drawable
│ │ │ │ ├── icon.png
│ │ │ │ └── oauth.png
│ │ ├── app.config
│ │ ├── obj
│ │ │ └── Debug
│ │ │ │ └── __library_projects__
│ │ │ │ └── OAuthForms1.stamp
│ │ └── packages.config
│ ├── OAuthForms1.WinPhone
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── Assets
│ │ │ ├── AlignmentGrid.png
│ │ │ ├── ApplicationIcon.png
│ │ │ └── Tiles
│ │ │ │ ├── FlipCycleTileLarge.png
│ │ │ │ ├── FlipCycleTileMedium.png
│ │ │ │ ├── FlipCycleTileSmall.png
│ │ │ │ ├── IconicTileMediumLarge.png
│ │ │ │ └── IconicTileSmall.png
│ │ ├── Bin
│ │ │ └── Debug
│ │ │ │ └── AppManifest.xaml
│ │ ├── LocalizedStrings.cs
│ │ ├── MainPage.xaml
│ │ ├── MainPage.xaml.cs
│ │ ├── OAuthForms1.WinPhone.csproj
│ │ ├── OAuthForms1.WinPhone.csproj.user
│ │ ├── Properties
│ │ │ ├── AppManifest.xml
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── WMAppManifest.xml
│ │ ├── README_FIRST.txt
│ │ ├── Resources
│ │ │ ├── AppResources.Designer.cs
│ │ │ └── AppResources.resx
│ │ ├── SplashScreenImage.jpg
│ │ ├── Toolkit.Content
│ │ │ ├── ApplicationBar.Add.png
│ │ │ ├── ApplicationBar.Cancel.png
│ │ │ ├── ApplicationBar.Check.png
│ │ │ ├── ApplicationBar.Delete.png
│ │ │ └── ApplicationBar.Select.png
│ │ └── packages.config
│ ├── OAuthForms1.iOS
│ │ ├── AppDelegate.cs
│ │ ├── Entitlements.plist
│ │ ├── Info.plist
│ │ ├── Main.cs
│ │ ├── OAuthForms1.iOS.csproj
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Resources
│ │ │ ├── Default-568h@2x.png
│ │ │ ├── Default-Portrait.png
│ │ │ ├── Default-Portrait@2x.png
│ │ │ ├── Default.png
│ │ │ ├── Default@2x.png
│ │ │ ├── Icon-60@2x.png
│ │ │ ├── Icon-60@3x.png
│ │ │ ├── Icon-76.png
│ │ │ ├── Icon-76@2x.png
│ │ │ ├── Icon-Small-40.png
│ │ │ ├── Icon-Small-40@2x.png
│ │ │ ├── Icon-Small-40@3x.png
│ │ │ ├── Icon-Small.png
│ │ │ ├── Icon-Small@2x.png
│ │ │ ├── Icon-Small@3x.png
│ │ │ └── LaunchScreen.storyboard
│ │ ├── iTunesArtwork
│ │ ├── iTunesArtwork@2x
│ │ └── packages.config
│ └── OAuthForms1
│ │ ├── App.cs
│ │ ├── Authorize.cs
│ │ ├── DoSomeWork.xaml
│ │ ├── DoSomeWork.xaml.cs
│ │ ├── OAuthForms1.csproj
│ │ ├── OAuthProviders.json
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── Providers.cs
│ │ ├── oauth.jpg
│ │ └── packages.config
├── README.txt
├── ToDo.txt
├── UAuth
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── UAuth.csproj
│ ├── obj
│ │ └── Debug
│ │ │ └── UAuth.pdb
│ └── packages.config
├── packages
│ └── repositories.config
└── src
│ ├── uauthdefs.cs
│ └── uauthimpl.cs
└── README.md
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 BSalita
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/OAuthForms1/.vs/OAuthForms1/v14/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/.vs/OAuthForms1/v14/.suo
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 14
4 | VisualStudioVersion = 14.0.22823.1
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OAuthForms1", "OAuthForms1\OAuthForms1\OAuthForms1.csproj", "{24109515-F42F-4C85-9FFE-8871BCD132ED}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OAuthForms1.iOS", "OAuthForms1\OAuthForms1.iOS\OAuthForms1.iOS.csproj", "{A8774B76-B467-4233-9CF4-D039257E4C1A}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OAuthForms1.Droid", "OAuthForms1\OAuthForms1.Droid\OAuthForms1.Droid.csproj", "{95B2B29D-46F9-40C7-926F-CE6043A5F1FF}"
11 | EndProject
12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OAuthForms1.WinPhone", "OAuthForms1\OAuthForms1.WinPhone\OAuthForms1.WinPhone.csproj", "{0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}"
13 | EndProject
14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UAuth", "UAuth\UAuth.csproj", "{67F9D3A8-F71E-4428-913F-C37AE82CDB24}"
15 | EndProject
16 | Global
17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
18 | Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
19 | Ad-Hoc|ARM = Ad-Hoc|ARM
20 | Ad-Hoc|iPhone = Ad-Hoc|iPhone
21 | Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
22 | Ad-Hoc|Mixed Platforms = Ad-Hoc|Mixed Platforms
23 | Ad-Hoc|x86 = Ad-Hoc|x86
24 | AppStore|Any CPU = AppStore|Any CPU
25 | AppStore|ARM = AppStore|ARM
26 | AppStore|iPhone = AppStore|iPhone
27 | AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
28 | AppStore|Mixed Platforms = AppStore|Mixed Platforms
29 | AppStore|x86 = AppStore|x86
30 | Debug|Any CPU = Debug|Any CPU
31 | Debug|ARM = Debug|ARM
32 | Debug|iPhone = Debug|iPhone
33 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
34 | Debug|Mixed Platforms = Debug|Mixed Platforms
35 | Debug|x86 = Debug|x86
36 | Release|Any CPU = Release|Any CPU
37 | Release|ARM = Release|ARM
38 | Release|iPhone = Release|iPhone
39 | Release|iPhoneSimulator = Release|iPhoneSimulator
40 | Release|Mixed Platforms = Release|Mixed Platforms
41 | Release|x86 = Release|x86
42 | EndGlobalSection
43 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
44 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
45 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
46 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
47 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
48 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
49 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
50 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
51 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
52 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Ad-Hoc|Mixed Platforms.ActiveCfg = Debug|Any CPU
53 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Ad-Hoc|Mixed Platforms.Build.0 = Debug|Any CPU
54 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
55 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Ad-Hoc|x86.Build.0 = Release|Any CPU
56 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
57 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.AppStore|Any CPU.Build.0 = Release|Any CPU
58 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.AppStore|ARM.ActiveCfg = Release|Any CPU
59 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.AppStore|ARM.Build.0 = Release|Any CPU
60 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.AppStore|iPhone.ActiveCfg = Release|Any CPU
61 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.AppStore|iPhone.Build.0 = Release|Any CPU
62 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
63 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
64 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.AppStore|Mixed Platforms.ActiveCfg = Debug|Any CPU
65 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.AppStore|Mixed Platforms.Build.0 = Debug|Any CPU
66 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.AppStore|x86.ActiveCfg = Release|Any CPU
67 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.AppStore|x86.Build.0 = Release|Any CPU
68 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
69 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
70 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Debug|ARM.ActiveCfg = Debug|Any CPU
71 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Debug|ARM.Build.0 = Debug|Any CPU
72 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Debug|iPhone.ActiveCfg = Debug|Any CPU
73 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Debug|iPhone.Build.0 = Debug|Any CPU
74 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
75 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
76 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
77 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
78 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Debug|x86.ActiveCfg = Debug|Any CPU
79 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Debug|x86.Build.0 = Debug|Any CPU
80 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
81 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Release|Any CPU.Build.0 = Release|Any CPU
82 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Release|ARM.ActiveCfg = Release|Any CPU
83 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Release|ARM.Build.0 = Release|Any CPU
84 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Release|iPhone.ActiveCfg = Release|Any CPU
85 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Release|iPhone.Build.0 = Release|Any CPU
86 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
87 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
88 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
89 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Release|Mixed Platforms.Build.0 = Release|Any CPU
90 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Release|x86.ActiveCfg = Release|Any CPU
91 | {24109515-F42F-4C85-9FFE-8871BCD132ED}.Release|x86.Build.0 = Release|Any CPU
92 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
93 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone
94 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
95 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
96 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
97 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
98 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Ad-Hoc|Mixed Platforms.ActiveCfg = Ad-Hoc|iPhoneSimulator
99 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone
100 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
101 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.AppStore|ARM.ActiveCfg = AppStore|iPhone
102 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
103 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.AppStore|iPhone.Build.0 = AppStore|iPhone
104 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
105 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
106 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.AppStore|Mixed Platforms.ActiveCfg = AppStore|iPhoneSimulator
107 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.AppStore|x86.ActiveCfg = AppStore|iPhone
108 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Debug|Any CPU.ActiveCfg = Debug|iPhone
109 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Debug|ARM.ActiveCfg = Debug|iPhone
110 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Debug|iPhone.ActiveCfg = Debug|iPhone
111 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Debug|iPhone.Build.0 = Debug|iPhone
112 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
113 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
114 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Debug|Mixed Platforms.ActiveCfg = Debug|iPhoneSimulator
115 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Debug|x86.ActiveCfg = Debug|iPhone
116 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Release|Any CPU.ActiveCfg = Release|iPhone
117 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Release|ARM.ActiveCfg = Release|iPhone
118 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Release|iPhone.ActiveCfg = Release|iPhone
119 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Release|iPhone.Build.0 = Release|iPhone
120 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
121 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
122 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Release|Mixed Platforms.ActiveCfg = Release|iPhoneSimulator
123 | {A8774B76-B467-4233-9CF4-D039257E4C1A}.Release|x86.ActiveCfg = Release|iPhone
124 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
125 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
126 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
127 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
128 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
129 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|ARM.Deploy.0 = Release|Any CPU
130 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
131 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
132 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU
133 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
134 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
135 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU
136 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|Mixed Platforms.ActiveCfg = Debug|Any CPU
137 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|Mixed Platforms.Build.0 = Debug|Any CPU
138 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|Mixed Platforms.Deploy.0 = Debug|Any CPU
139 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
140 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|x86.Build.0 = Release|Any CPU
141 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Ad-Hoc|x86.Deploy.0 = Release|Any CPU
142 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
143 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|Any CPU.Build.0 = Release|Any CPU
144 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
145 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|ARM.ActiveCfg = Release|Any CPU
146 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|ARM.Build.0 = Release|Any CPU
147 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|ARM.Deploy.0 = Release|Any CPU
148 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|iPhone.ActiveCfg = Release|Any CPU
149 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|iPhone.Build.0 = Release|Any CPU
150 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|iPhone.Deploy.0 = Release|Any CPU
151 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
152 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
153 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU
154 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|Mixed Platforms.ActiveCfg = Debug|Any CPU
155 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|Mixed Platforms.Build.0 = Debug|Any CPU
156 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|Mixed Platforms.Deploy.0 = Debug|Any CPU
157 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|x86.ActiveCfg = Release|Any CPU
158 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|x86.Build.0 = Release|Any CPU
159 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.AppStore|x86.Deploy.0 = Release|Any CPU
160 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
161 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
162 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
163 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|ARM.ActiveCfg = Debug|Any CPU
164 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|ARM.Build.0 = Debug|Any CPU
165 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|ARM.Deploy.0 = Debug|Any CPU
166 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|iPhone.ActiveCfg = Debug|Any CPU
167 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|iPhone.Build.0 = Debug|Any CPU
168 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|iPhone.Deploy.0 = Debug|Any CPU
169 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
170 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
171 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
172 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
173 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
174 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
175 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|x86.ActiveCfg = Debug|Any CPU
176 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|x86.Build.0 = Debug|Any CPU
177 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Debug|x86.Deploy.0 = Debug|Any CPU
178 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
179 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|Any CPU.Build.0 = Release|Any CPU
180 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|Any CPU.Deploy.0 = Release|Any CPU
181 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|ARM.ActiveCfg = Release|Any CPU
182 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|ARM.Build.0 = Release|Any CPU
183 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|ARM.Deploy.0 = Release|Any CPU
184 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|iPhone.ActiveCfg = Release|Any CPU
185 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|iPhone.Build.0 = Release|Any CPU
186 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|iPhone.Deploy.0 = Release|Any CPU
187 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
188 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
189 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
190 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
191 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
192 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|Mixed Platforms.Deploy.0 = Release|Any CPU
193 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|x86.ActiveCfg = Release|Any CPU
194 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|x86.Build.0 = Release|Any CPU
195 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}.Release|x86.Deploy.0 = Release|Any CPU
196 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
197 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
198 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
199 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|ARM.ActiveCfg = Release|ARM
200 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|ARM.Build.0 = Release|ARM
201 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|ARM.Deploy.0 = Release|ARM
202 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
203 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
204 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|iPhone.Deploy.0 = Release|Any CPU
205 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
206 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
207 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|Any CPU
208 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|Mixed Platforms.ActiveCfg = Debug|x86
209 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|x86.ActiveCfg = Release|x86
210 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|x86.Build.0 = Release|x86
211 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Ad-Hoc|x86.Deploy.0 = Release|x86
212 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
213 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|Any CPU.Build.0 = Release|Any CPU
214 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
215 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|ARM.ActiveCfg = Release|ARM
216 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|ARM.Build.0 = Release|ARM
217 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|ARM.Deploy.0 = Release|ARM
218 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|iPhone.ActiveCfg = Release|Any CPU
219 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|iPhone.Build.0 = Release|Any CPU
220 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|iPhone.Deploy.0 = Release|Any CPU
221 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
222 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
223 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|iPhoneSimulator.Deploy.0 = Release|Any CPU
224 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|Mixed Platforms.ActiveCfg = Debug|x86
225 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|x86.ActiveCfg = Release|x86
226 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|x86.Build.0 = Release|x86
227 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.AppStore|x86.Deploy.0 = Release|x86
228 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
229 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|Any CPU.Build.0 = Debug|Any CPU
230 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
231 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|ARM.ActiveCfg = Debug|ARM
232 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|ARM.Build.0 = Debug|ARM
233 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|ARM.Deploy.0 = Debug|ARM
234 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
235 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|iPhone.Build.0 = Debug|Any CPU
236 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|iPhone.Deploy.0 = Debug|Any CPU
237 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
238 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
239 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
240 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
241 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|x86.ActiveCfg = Debug|x86
242 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|x86.Build.0 = Debug|x86
243 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Debug|x86.Deploy.0 = Debug|x86
244 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|Any CPU.ActiveCfg = Release|Any CPU
245 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|Any CPU.Build.0 = Release|Any CPU
246 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|Any CPU.Deploy.0 = Release|Any CPU
247 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|ARM.ActiveCfg = Release|ARM
248 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|ARM.Build.0 = Release|ARM
249 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|ARM.Deploy.0 = Release|ARM
250 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|iPhone.ActiveCfg = Release|Any CPU
251 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|iPhone.Build.0 = Release|Any CPU
252 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|iPhone.Deploy.0 = Release|Any CPU
253 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
254 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
255 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
256 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|Mixed Platforms.ActiveCfg = Release|x86
257 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|x86.ActiveCfg = Release|x86
258 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|x86.Build.0 = Release|x86
259 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}.Release|x86.Deploy.0 = Release|x86
260 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
261 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
262 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
263 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
264 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
265 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
266 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
267 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
268 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Mixed Platforms.ActiveCfg = Release|Any CPU
269 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|Mixed Platforms.Build.0 = Release|Any CPU
270 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
271 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Ad-Hoc|x86.Build.0 = Release|Any CPU
272 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
273 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|Any CPU.Build.0 = Release|Any CPU
274 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|ARM.ActiveCfg = Release|Any CPU
275 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|ARM.Build.0 = Release|Any CPU
276 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|iPhone.ActiveCfg = Release|Any CPU
277 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|iPhone.Build.0 = Release|Any CPU
278 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
279 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
280 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|Mixed Platforms.ActiveCfg = Release|Any CPU
281 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|Mixed Platforms.Build.0 = Release|Any CPU
282 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|x86.ActiveCfg = Release|Any CPU
283 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.AppStore|x86.Build.0 = Release|Any CPU
284 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
285 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Any CPU.Build.0 = Debug|Any CPU
286 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|ARM.ActiveCfg = Debug|Any CPU
287 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|ARM.Build.0 = Debug|Any CPU
288 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|iPhone.ActiveCfg = Debug|Any CPU
289 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|iPhone.Build.0 = Debug|Any CPU
290 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
291 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
292 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
293 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
294 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|x86.ActiveCfg = Debug|Any CPU
295 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Debug|x86.Build.0 = Debug|Any CPU
296 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.ActiveCfg = Release|Any CPU
297 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Any CPU.Build.0 = Release|Any CPU
298 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|ARM.ActiveCfg = Release|Any CPU
299 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|ARM.Build.0 = Release|Any CPU
300 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|iPhone.ActiveCfg = Release|Any CPU
301 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|iPhone.Build.0 = Release|Any CPU
302 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
303 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
304 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
305 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|Mixed Platforms.Build.0 = Release|Any CPU
306 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|x86.ActiveCfg = Release|Any CPU
307 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}.Release|x86.Build.0 = Release|Any CPU
308 | EndGlobalSection
309 | GlobalSection(SolutionProperties) = preSolution
310 | HideSolutionNode = FALSE
311 | EndGlobalSection
312 | EndGlobal
313 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with you package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content.PM;
5 | using Android.OS;
6 |
7 | using OAuthForms1;
8 |
9 | namespace OAuthForms1.Droid
10 | {
11 | [Activity(Label = "OAuthForms1", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
12 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
13 | {
14 | protected override void OnCreate(Bundle bundle)
15 | {
16 | base.OnCreate(bundle);
17 | global::Xamarin.Forms.Forms.Init(this, bundle);
18 | UAuth.Auth.auth = new UAuthImpl.Auth(this);
19 | LoadApplication(new App());
20 | }
21 | }
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/OAuthForms1.Droid.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 8.0.30703
7 | 2.0
8 | {95B2B29D-46F9-40C7-926F-CE6043A5F1FF}
9 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Library
11 | Properties
12 | OAuthForms1.Droid
13 | OAuthForms1.Droid
14 | 512
15 | true
16 | Resources\Resource.Designer.cs
17 | Off
18 | Properties\AndroidManifest.xml
19 | true
20 | armeabi,armeabi-v7a,x86
21 |
22 |
23 |
24 |
25 | v5.0
26 |
27 |
28 |
29 |
30 | true
31 | full
32 | false
33 | bin\Debug\
34 | DEBUG;TRACE
35 | prompt
36 | 4
37 | True
38 | None
39 |
40 |
41 | pdbonly
42 | true
43 | bin\Release\
44 | TRACE
45 | prompt
46 | 4
47 | False
48 | SdkOnly
49 |
50 |
51 |
52 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\FormsViewGroup.dll
53 | True
54 |
55 |
56 |
57 |
58 | ..\..\packages\Newtonsoft.Json.6.0.8\lib\portable-net40+sl5+wp80+win8+wpa81\Newtonsoft.Json.dll
59 | True
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | ..\..\packages\Xamarin.Android.Support.v4.22.1.1.1\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll
68 | True
69 |
70 |
71 | ..\..\Components\xamarin.auth-1.2.3.1\lib\android\Xamarin.Auth.Android.dll
72 |
73 |
74 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Core.dll
75 | True
76 |
77 |
78 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Platform.dll
79 | True
80 |
81 |
82 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
83 | True
84 |
85 |
86 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
87 | True
88 |
89 |
90 |
91 |
92 | uauthimpl.cs
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | {67f9d3a8-f71e-4428-913f-c37ae82cdb24}
116 | UAuth
117 |
118 |
119 | OAuthForms1
120 |
121 |
122 |
123 |
124 | False
125 | 1.2.3.1
126 |
127 |
128 |
129 |
130 |
131 |
132 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
133 |
134 |
135 |
136 |
143 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/OAuthForms1.Droid.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Samsung SM-G920T
5 |
6 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("OAuthForms1.Droid")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("OAuthForms1.Droid")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
32 | // Add some common permissions, these can be removed if not needed
33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
35 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
51 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Resources/Resource.Designer.cs:
--------------------------------------------------------------------------------
1 | #pragma warning disable 1591
2 | //------------------------------------------------------------------------------
3 | //
4 | // This code was generated by a tool.
5 | // Runtime Version:4.0.30319.0
6 | //
7 | // Changes to this file may cause incorrect behavior and will be lost if
8 | // the code is regenerated.
9 | //
10 | //------------------------------------------------------------------------------
11 |
12 | [assembly: global::Android.Runtime.ResourceDesignerAttribute("OAuthForms1.Droid.Resource", IsApplication=true)]
13 |
14 | namespace OAuthForms1.Droid
15 | {
16 |
17 |
18 | [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
19 | public partial class Resource
20 | {
21 |
22 | static Resource()
23 | {
24 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
25 | }
26 |
27 | public static void UpdateIdValues()
28 | {
29 | global::Xamarin.Forms.Platform.Resource.String.ApplicationName = global::OAuthForms1.Droid.Resource.String.ApplicationName;
30 | global::Xamarin.Forms.Platform.Resource.String.Hello = global::OAuthForms1.Droid.Resource.String.Hello;
31 | }
32 |
33 | public partial class Attribute
34 | {
35 |
36 | static Attribute()
37 | {
38 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
39 | }
40 |
41 | private Attribute()
42 | {
43 | }
44 | }
45 |
46 | public partial class Drawable
47 | {
48 |
49 | // aapt resource value: 0x7f020000
50 | public const int icon = 2130837504;
51 |
52 | // aapt resource value: 0x7f020001
53 | public const int monoandroidsplash = 2130837505;
54 |
55 | // aapt resource value: 0x7f020002
56 | public const int oauth = 2130837506;
57 |
58 | static Drawable()
59 | {
60 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
61 | }
62 |
63 | private Drawable()
64 | {
65 | }
66 | }
67 |
68 | public partial class String
69 | {
70 |
71 | // aapt resource value: 0x7f030001
72 | public const int ApplicationName = 2130903041;
73 |
74 | // aapt resource value: 0x7f030000
75 | public const int Hello = 2130903040;
76 |
77 | static String()
78 | {
79 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
80 | }
81 |
82 | private String()
83 | {
84 | }
85 | }
86 |
87 | public partial class Style
88 | {
89 |
90 | // aapt resource value: 0x7f040000
91 | public const int Mono_Android_Theme_Splash = 2130968576;
92 |
93 | static Style()
94 | {
95 | global::Android.Runtime.ResourceIdManager.UpdateIdValues();
96 | }
97 |
98 | private Style()
99 | {
100 | }
101 | }
102 | }
103 | }
104 | #pragma warning restore 1591
105 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Resources/drawable/oauth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.Droid/Resources/drawable/oauth.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/obj/Debug/__library_projects__/OAuthForms1.stamp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.Droid/obj/Debug/__library_projects__/OAuthForms1.stamp
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.Resources;
4 | using System.Windows;
5 | using System.Windows.Markup;
6 | using System.Windows.Navigation;
7 | using Microsoft.Phone.Controls;
8 | using Microsoft.Phone.Shell;
9 | using OAuthForms1.WinPhone.Resources;
10 |
11 | namespace OAuthForms1.WinPhone
12 | {
13 | public partial class App : Application
14 | {
15 | ///
16 | /// Provides easy access to the root frame of the Phone Application.
17 | ///
18 | /// The root frame of the Phone Application.
19 | public static PhoneApplicationFrame RootFrame { get; private set; }
20 |
21 | ///
22 | /// Constructor for the Application object.
23 | ///
24 | public App()
25 | {
26 | // Global handler for uncaught exceptions.
27 | UnhandledException += Application_UnhandledException;
28 |
29 | // Standard XAML initialization
30 | InitializeComponent();
31 |
32 | // Phone-specific initialization
33 | InitializePhoneApplication();
34 |
35 | // Language display initialization
36 | InitializeLanguage();
37 |
38 | // Show graphics profiling information while debugging.
39 | if (Debugger.IsAttached)
40 | {
41 | // Display the current frame rate counters.
42 | Application.Current.Host.Settings.EnableFrameRateCounter = true;
43 |
44 | // Show the areas of the app that are being redrawn in each frame.
45 | //Application.Current.Host.Settings.EnableRedrawRegions = true;
46 |
47 | // Enable non-production analysis visualization mode,
48 | // which shows areas of a page that are handed off to GPU with a colored overlay.
49 | //Application.Current.Host.Settings.EnableCacheVisualization = true;
50 |
51 | // Prevent the screen from turning off while under the debugger by disabling
52 | // the application's idle detection.
53 | // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run
54 | // and consume battery power when the user is not using the phone.
55 | PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
56 | }
57 |
58 | }
59 |
60 | // Code to execute when the application is launching (eg, from Start)
61 | // This code will not execute when the application is reactivated
62 | private void Application_Launching(object sender, LaunchingEventArgs e)
63 | {
64 | }
65 |
66 | // Code to execute when the application is activated (brought to foreground)
67 | // This code will not execute when the application is first launched
68 | private void Application_Activated(object sender, ActivatedEventArgs e)
69 | {
70 | }
71 |
72 | // Code to execute when the application is deactivated (sent to background)
73 | // This code will not execute when the application is closing
74 | private void Application_Deactivated(object sender, DeactivatedEventArgs e)
75 | {
76 | }
77 |
78 | // Code to execute when the application is closing (eg, user hit Back)
79 | // This code will not execute when the application is deactivated
80 | private void Application_Closing(object sender, ClosingEventArgs e)
81 | {
82 | }
83 |
84 | // Code to execute if a navigation fails
85 | private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
86 | {
87 | if (Debugger.IsAttached)
88 | {
89 | // A navigation has failed; break into the debugger
90 | Debugger.Break();
91 | }
92 | }
93 |
94 | // Code to execute on Unhandled Exceptions
95 | private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
96 | {
97 | if (Debugger.IsAttached)
98 | {
99 | // An unhandled exception has occurred; break into the debugger
100 | Debugger.Break();
101 | }
102 | }
103 |
104 | #region Phone application initialization
105 |
106 | // Avoid double-initialization
107 | private bool phoneApplicationInitialized = false;
108 |
109 | // Do not add any additional code to this method
110 | private void InitializePhoneApplication()
111 | {
112 | if (phoneApplicationInitialized)
113 | return;
114 |
115 | // Create the frame but don't set it as RootVisual yet; this allows the splash
116 | // screen to remain active until the application is ready to render.
117 | RootFrame = new PhoneApplicationFrame();
118 | RootFrame.Navigated += CompleteInitializePhoneApplication;
119 |
120 | // Handle navigation failures
121 | RootFrame.NavigationFailed += RootFrame_NavigationFailed;
122 |
123 | // Handle reset requests for clearing the backstack
124 | RootFrame.Navigated += CheckForResetNavigation;
125 |
126 | // Ensure we don't initialize again
127 | phoneApplicationInitialized = true;
128 | }
129 |
130 | // Do not add any additional code to this method
131 | private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
132 | {
133 | // Set the root visual to allow the application to render
134 | if (RootVisual != RootFrame)
135 | RootVisual = RootFrame;
136 |
137 | // Remove this handler since it is no longer needed
138 | RootFrame.Navigated -= CompleteInitializePhoneApplication;
139 | }
140 |
141 | private void CheckForResetNavigation(object sender, NavigationEventArgs e)
142 | {
143 | // If the app has received a 'reset' navigation, then we need to check
144 | // on the next navigation to see if the page stack should be reset
145 | if (e.NavigationMode == NavigationMode.Reset)
146 | RootFrame.Navigated += ClearBackStackAfterReset;
147 | }
148 |
149 | private void ClearBackStackAfterReset(object sender, NavigationEventArgs e)
150 | {
151 | // Unregister the event so it doesn't get called again
152 | RootFrame.Navigated -= ClearBackStackAfterReset;
153 |
154 | // Only clear the stack for 'new' (forward) and 'refresh' navigations
155 | if (e.NavigationMode != NavigationMode.New && e.NavigationMode != NavigationMode.Refresh)
156 | return;
157 |
158 | // For UI consistency, clear the entire page stack
159 | while (RootFrame.RemoveBackEntry() != null)
160 | {
161 | ; // do nothing
162 | }
163 | }
164 |
165 | #endregion
166 |
167 | // Initialize the app's font and flow direction as defined in its localized resource strings.
168 | //
169 | // To ensure that the font of your application is aligned with its supported languages and that the
170 | // FlowDirection for each of those languages follows its traditional direction, ResourceLanguage
171 | // and ResourceFlowDirection should be initialized in each resx file to match these values with that
172 | // file's culture. For example:
173 | //
174 | // AppResources.es-ES.resx
175 | // ResourceLanguage's value should be "es-ES"
176 | // ResourceFlowDirection's value should be "LeftToRight"
177 | //
178 | // AppResources.ar-SA.resx
179 | // ResourceLanguage's value should be "ar-SA"
180 | // ResourceFlowDirection's value should be "RightToLeft"
181 | //
182 | // For more info on localizing Windows Phone apps see http://go.microsoft.com/fwlink/?LinkId=262072.
183 | //
184 | private void InitializeLanguage()
185 | {
186 | try
187 | {
188 | // Set the font to match the display language defined by the
189 | // ResourceLanguage resource string for each supported language.
190 | //
191 | // Fall back to the font of the neutral language if the Display
192 | // language of the phone is not supported.
193 | //
194 | // If a compiler error is hit then ResourceLanguage is missing from
195 | // the resource file.
196 | RootFrame.Language = XmlLanguage.GetLanguage(AppResources.ResourceLanguage);
197 |
198 | // Set the FlowDirection of all elements under the root frame based
199 | // on the ResourceFlowDirection resource string for each
200 | // supported language.
201 | //
202 | // If a compiler error is hit then ResourceFlowDirection is missing from
203 | // the resource file.
204 | FlowDirection flow = (FlowDirection)Enum.Parse(typeof(FlowDirection), AppResources.ResourceFlowDirection);
205 | RootFrame.FlowDirection = flow;
206 | }
207 | catch
208 | {
209 | // If an exception is caught here it is most likely due to either
210 | // ResourceLangauge not being correctly set to a supported language
211 | // code or ResourceFlowDirection is set to a value other than LeftToRight
212 | // or RightToLeft.
213 |
214 | if (Debugger.IsAttached)
215 | {
216 | Debugger.Break();
217 | }
218 |
219 | throw;
220 | }
221 | }
222 | }
223 | }
224 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/AlignmentGrid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/AlignmentGrid.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/ApplicationIcon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/ApplicationIcon.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/Tiles/FlipCycleTileLarge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/Tiles/FlipCycleTileLarge.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/Tiles/FlipCycleTileMedium.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/Tiles/FlipCycleTileMedium.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/Tiles/FlipCycleTileSmall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/Tiles/FlipCycleTileSmall.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/Tiles/IconicTileMediumLarge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/Tiles/IconicTileMediumLarge.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/Tiles/IconicTileSmall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Assets/Tiles/IconicTileSmall.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Bin/Debug/AppManifest.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/LocalizedStrings.cs:
--------------------------------------------------------------------------------
1 | using OAuthForms1.WinPhone.Resources;
2 |
3 | namespace OAuthForms1.WinPhone
4 | {
5 | ///
6 | /// Provides access to string resources.
7 | ///
8 | public class LocalizedStrings
9 | {
10 | private static AppResources _localizedResources = new AppResources();
11 |
12 | public AppResources LocalizedResources { get { return _localizedResources; } }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Net;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Navigation;
8 | using Microsoft.Phone.Controls;
9 | using Microsoft.Phone.Shell;
10 |
11 | namespace OAuthForms1.WinPhone
12 | {
13 | public partial class MainPage : global::Xamarin.Forms.Platform.WinPhone.FormsApplicationPage
14 | {
15 | public MainPage()
16 | {
17 | InitializeComponent();
18 | SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;
19 |
20 | global::Xamarin.Forms.Forms.Init();
21 | UAuth.Auth.auth = new UAuthImpl.Auth();
22 | LoadApplication(new OAuthForms1.App());
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/OAuthForms1.WinPhone.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | 10.0.20506
7 | 2.0
8 | {0D26DB0B-577E-4ED1-BDBF-5B854C71E86F}
9 | {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
10 | Library
11 | Properties
12 | OAuthForms1.WinPhone
13 | OAuthForms1.WinPhone
14 | WindowsPhone
15 | v8.0
16 | $(TargetFrameworkVersion)
17 | true
18 |
19 |
20 | true
21 | true
22 | PhoneApp1_$(Configuration)_$(Platform).xap
23 | Properties\AppManifest.xml
24 | OAuthForms1.WinPhone.App
25 | true
26 | 11.0
27 | true
28 |
29 |
30 |
31 |
32 | true
33 | full
34 | false
35 | Bin\Debug
36 | DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
37 | true
38 | true
39 | prompt
40 | 4
41 |
42 |
43 | pdbonly
44 | true
45 | Bin\Release
46 | TRACE;SILVERLIGHT;WINDOWS_PHONE
47 | true
48 | true
49 | prompt
50 | 4
51 |
52 |
53 | true
54 | full
55 | false
56 | Bin\x86\Debug
57 | DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
58 | true
59 | true
60 | prompt
61 | 4
62 |
63 |
64 | pdbonly
65 | true
66 | Bin\x86\Release
67 | TRACE;SILVERLIGHT;WINDOWS_PHONE
68 | true
69 | true
70 | prompt
71 | 4
72 |
73 |
74 | true
75 | full
76 | false
77 | Bin\ARM\Debug
78 | DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
79 | true
80 | true
81 | prompt
82 | 4
83 |
84 |
85 | pdbonly
86 | true
87 | Bin\ARM\Release
88 | TRACE;SILVERLIGHT;WINDOWS_PHONE
89 | true
90 | true
91 | prompt
92 | 4
93 |
94 |
95 |
96 | uauthimpl.cs
97 |
98 |
99 | App.xaml
100 |
101 |
102 |
103 | MainPage.xaml
104 |
105 |
106 |
107 | True
108 | True
109 | AppResources.resx
110 |
111 |
112 |
113 |
114 | Designer
115 | MSBuild:Compile
116 |
117 |
118 | Designer
119 | MSBuild:Compile
120 |
121 |
122 |
123 |
124 |
125 |
126 | Designer
127 |
128 |
129 |
130 |
131 |
132 | PreserveNewest
133 |
134 |
135 |
136 | PreserveNewest
137 |
138 |
139 | PreserveNewest
140 |
141 |
142 | PreserveNewest
143 |
144 |
145 | PreserveNewest
146 |
147 |
148 | PreserveNewest
149 |
150 |
151 | PreserveNewest
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 | PublicResXFileCodeGenerator
162 | AppResources.Designer.cs
163 |
164 |
165 |
166 |
167 | {67f9d3a8-f71e-4428-913f-c37ae82cdb24}
168 | UAuth
169 |
170 |
171 | OAuthForms1
172 |
173 |
174 |
175 |
176 | ..\..\packages\WPtoolkit.4.2013.08.16\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll
177 | True
178 |
179 |
180 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\WP80\Xamarin.Forms.Core.dll
181 | True
182 |
183 |
184 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\WP80\Xamarin.Forms.Platform.WP8.dll
185 | True
186 |
187 |
188 | ..\..\packages\Xamarin.Forms.1.3.3.6323\lib\WP80\Xamarin.Forms.Xaml.dll
189 | True
190 |
191 |
192 |
193 |
194 |
201 |
202 |
203 |
204 |
205 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
206 |
207 |
208 |
209 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/OAuthForms1.WinPhone.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | True
8 | Managed
9 | Managed
10 | False
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Properties/AppManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using System.Resources;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("OAuthForms1.WinPhone")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("OAuthForms1.WinPhone")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 |
18 | // Setting ComVisible to false makes the types in this assembly not visible
19 | // to COM components. If you need to access a type in this assembly from
20 | // COM, set the ComVisible attribute to true on that type.
21 | [assembly: ComVisible(false)]
22 |
23 | // The following GUID is for the ID of the typelib if this project is exposed to COM
24 | [assembly: Guid("65077432-0c92-466b-b68d-911a8ec84f1d")]
25 |
26 | // Version information for an assembly consists of the following four values:
27 | //
28 | // Major Version
29 | // Minor Version
30 | // Build Number
31 | // Revision
32 | //
33 | // You can specify all the values or you can default the Revision and Build Numbers
34 | // by using the '*' as shown below:
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 | [assembly: NeutralResourcesLanguageAttribute("en-US")]
38 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Properties/WMAppManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Assets\ApplicationIcon.png
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | Assets\Tiles\FlipCycleTileSmall.png
21 | 0
22 | Assets\Tiles\FlipCycleTileMedium.png
23 | OAuthForms1.WinPhone
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/README_FIRST.txt:
--------------------------------------------------------------------------------
1 | For the Windows Phone toolkit make sure that you have
2 | marked the icons in the "Toolkit.Content" folder as content. That way they
3 | can be used as the icons for the ApplicationBar control.
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Resources/AppResources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.17626
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace OAuthForms1.WinPhone.Resources
12 | {
13 | using System;
14 |
15 |
16 | ///
17 | /// A strongly-typed resource class, for looking up localized strings, etc.
18 | ///
19 | // This class was auto-generated by the StronglyTypedResourceBuilder
20 | // class via a tool like ResGen or Visual Studio.
21 | // To add or remove a member, edit your .ResX file then rerun ResGen
22 | // with the /str option, or rebuild your VS project.
23 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
24 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
25 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
26 | public class AppResources
27 | {
28 |
29 | private static global::System.Resources.ResourceManager resourceMan;
30 |
31 | private static global::System.Globalization.CultureInfo resourceCulture;
32 |
33 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
34 | internal AppResources()
35 | {
36 | }
37 |
38 | ///
39 | /// Returns the cached ResourceManager instance used by this class.
40 | ///
41 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
42 | public static global::System.Resources.ResourceManager ResourceManager
43 | {
44 | get
45 | {
46 | if (object.ReferenceEquals(resourceMan, null))
47 | {
48 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OAuthForms1.WinPhone.Resources.AppResources", typeof(AppResources).Assembly);
49 | resourceMan = temp;
50 | }
51 | return resourceMan;
52 | }
53 | }
54 |
55 | ///
56 | /// Overrides the current thread's CurrentUICulture property for all
57 | /// resource lookups using this strongly typed resource class.
58 | ///
59 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
60 | public static global::System.Globalization.CultureInfo Culture
61 | {
62 | get
63 | {
64 | return resourceCulture;
65 | }
66 | set
67 | {
68 | resourceCulture = value;
69 | }
70 | }
71 |
72 | ///
73 | /// Looks up a localized string similar to LeftToRight.
74 | ///
75 | public static string ResourceFlowDirection
76 | {
77 | get
78 | {
79 | return ResourceManager.GetString("ResourceFlowDirection", resourceCulture);
80 | }
81 | }
82 |
83 | ///
84 | /// Looks up a localized string similar to us-EN.
85 | ///
86 | public static string ResourceLanguage
87 | {
88 | get
89 | {
90 | return ResourceManager.GetString("ResourceLanguage", resourceCulture);
91 | }
92 | }
93 |
94 | ///
95 | /// Looks up a localized string similar to MY APPLICATION.
96 | ///
97 | public static string ApplicationTitle
98 | {
99 | get
100 | {
101 | return ResourceManager.GetString("ApplicationTitle", resourceCulture);
102 | }
103 | }
104 |
105 | ///
106 | /// Looks up a localized string similar to button.
107 | ///
108 | public static string AppBarButtonText
109 | {
110 | get
111 | {
112 | return ResourceManager.GetString("AppBarButtonText", resourceCulture);
113 | }
114 | }
115 |
116 | ///
117 | /// Looks up a localized string similar to menu item.
118 | ///
119 | public static string AppBarMenuItemText
120 | {
121 | get
122 | {
123 | return ResourceManager.GetString("AppBarMenuItemText", resourceCulture);
124 | }
125 | }
126 | }
127 | }
128 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Resources/AppResources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
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 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | LeftToRight
122 | Controls the FlowDirection for all elements in the RootFrame. Set to the traditional direction of this resource file's language
123 |
124 |
125 | en-US
126 | Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language.
127 |
128 |
129 | MY APPLICATION
130 |
131 |
132 | add
133 |
134 |
135 | Menu Item
136 |
137 |
138 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/SplashScreenImage.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/SplashScreenImage.jpg
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Toolkit.Content/ApplicationBar.Add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Toolkit.Content/ApplicationBar.Add.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Toolkit.Content/ApplicationBar.Cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Toolkit.Content/ApplicationBar.Cancel.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Toolkit.Content/ApplicationBar.Check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Toolkit.Content/ApplicationBar.Check.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Toolkit.Content/ApplicationBar.Delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Toolkit.Content/ApplicationBar.Delete.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Toolkit.Content/ApplicationBar.Select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/Toolkit.Content/ApplicationBar.Select.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.WinPhone/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace OAuthForms1.iOS
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register("AppDelegate")]
14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
15 | {
16 | //
17 | // This method is invoked when the application has loaded and is ready to run. In this
18 | // method you should instantiate the window, load the UI into it and then make the window
19 | // visible.
20 | //
21 | // You have 17 seconds to return from this method, or iOS will terminate your application.
22 | //
23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
24 | {
25 | global::Xamarin.Forms.Forms.Init();
26 | UAuth.Auth.auth = new UAuthImpl.Auth();
27 | LoadApplication(new App());
28 |
29 | return base.FinishedLaunching(app, options);
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UISupportedInterfaceOrientations
11 |
12 | UIInterfaceOrientationPortrait
13 | UIInterfaceOrientationLandscapeLeft
14 | UIInterfaceOrientationLandscapeRight
15 |
16 | UISupportedInterfaceOrientations~ipad
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationPortraitUpsideDown
20 | UIInterfaceOrientationLandscapeLeft
21 | UIInterfaceOrientationLandscapeRight
22 |
23 | MinimumOSVersion
24 | 6.0
25 | CFBundleDisplayName
26 | OAuthForms1
27 | CFBundleIdentifier
28 | com.yourcompany.OAuthForms1
29 | CFBundleVersion
30 | 1.0
31 | CFBundleIconFiles
32 |
33 | Icon-60@2x
34 | Icon-60@3x
35 | Icon-76
36 | Icon-76@2x
37 | Default
38 | Default@2x
39 | Default-568h@2x
40 | Default-Portrait
41 | Default-Portrait@2x
42 | Icon-Small-40
43 | Icon-Small-40@2x
44 | Icon-Small-40@3x
45 | Icon-Small
46 | Icon-Small@2x
47 | Icon-Small@3x
48 |
49 | UILaunchStoryboardName
50 | LaunchScreen
51 |
52 |
53 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace OAuthForms1.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/OAuthForms1.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | 8.0.30703
7 | 2.0
8 | {A8774B76-B467-4233-9CF4-D039257E4C1A}
9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | Exe
11 | OAuthForms1.iOS
12 | Resources
13 | OAuthForms1iOS
14 |
15 |
16 |
17 |
18 | true
19 | full
20 | false
21 | bin\iPhoneSimulator\Debug
22 | DEBUG
23 | prompt
24 | 4
25 | false
26 | i386, x86_64
27 | None
28 | true
29 | Entitlements.plist
30 |
31 |
32 | none
33 | true
34 | bin\iPhoneSimulator\Release
35 | prompt
36 | 4
37 | None
38 | i386, x86_64
39 | false
40 | Entitlements.plist
41 |
42 |
43 | true
44 | full
45 | false
46 | bin\iPhone\Debug
47 | DEBUG
48 | prompt
49 | 4
50 | false
51 | ARMv7, ARM64
52 | iPhone Developer
53 | true
54 | Entitlements.plist
55 |
56 |
57 | none
58 | true
59 | bin\iPhone\Release
60 | prompt
61 | 4
62 | ARMv7, ARM64
63 | false
64 | iPhone Developer
65 | Entitlements.plist
66 |
67 |
68 | none
69 | True
70 | bin\iPhone\Ad-Hoc
71 | prompt
72 | 4
73 | False
74 | ARMv7, ARM64
75 | True
76 | Automatic:AdHoc
77 | iPhone Distribution
78 | Entitlements.plist
79 |
80 |
81 | none
82 | True
83 | bin\iPhone\AppStore
84 | prompt
85 | 4
86 | False
87 | ARMv7, ARM64
88 | Automatic:AppStore
89 | iPhone Distribution
90 | Entitlements.plist
91 |
92 |
93 |
94 | uauthimpl.cs
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 | {67f9d3a8-f71e-4428-913f-c37ae82cdb24}
108 | UAuth
109 |
110 |
111 | OAuthForms1
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 | ..\..\Components\xamarin.auth-1.2.3.1\lib\ios-unified\Xamarin.Auth.iOS.dll
142 |
143 |
144 | ..\..\packages\Xamarin.Forms.1.4.3.6358-pre2\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll
145 | True
146 |
147 |
148 | ..\..\packages\Xamarin.Forms.1.4.3.6358-pre2\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll
149 | True
150 |
151 |
152 | ..\..\packages\Xamarin.Forms.1.4.3.6358-pre2\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll
153 | True
154 |
155 |
156 | ..\..\packages\Xamarin.Forms.1.4.3.6358-pre2\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll
157 | True
158 |
159 |
160 |
161 |
162 |
163 | False
164 | 1.2.3.1
165 |
166 |
167 |
168 |
169 |
170 |
171 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
172 |
173 |
174 |
175 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("OAuthForms1.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("OAuthForms1.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-60@2x.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-60@3x.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-76.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-76@2x.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-Small-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-Small-40.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-Small-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-Small-40@2x.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-Small-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-Small-40@3x.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-Small.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-Small@2x.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/Icon-Small@3x.png
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/Resources/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/iTunesArtwork:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/iTunesArtwork
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/iTunesArtwork@2x:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1.iOS/iTunesArtwork@2x
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1.iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1/App.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using Xamarin.Forms;
4 |
5 | namespace OAuthForms1
6 | {
7 | public class App : Application
8 | {
9 | public App()
10 | {
11 | MainPage = new DoSomeWork();
12 | }
13 |
14 | protected override void OnStart()
15 | {
16 | // Handle when your app starts
17 | }
18 |
19 | protected override void OnSleep()
20 | {
21 | // Handle when your app sleeps
22 | }
23 |
24 | protected override void OnResume()
25 | {
26 | // Handle when your app resumes
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1/Authorize.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 |
5 | using UAuth;
6 |
7 | namespace OAuthForms1
8 | {
9 | public class AuthenticatonPage : ContentPage
10 | {
11 | public static readonly BindableProperty RequestTextProperty = BindableProperty.Create(p => p.RequestText, string.Empty);
12 | public string RequestText { set { SetValue(RequestTextProperty, value); } get { return (string)GetValue(RequestTextProperty); } }
13 | public static readonly BindableProperty ResponseTextProperty = BindableProperty.Create(p => p.ResponseText, string.Empty);
14 | public string ResponseText { set { SetValue(ResponseTextProperty, value); } get { return (string)GetValue(ResponseTextProperty); } }
15 | public static readonly BindableProperty ErrorTextProperty = BindableProperty.Create(p => p.ErrorText, string.Empty);
16 | public string ErrorText { set { SetValue(ErrorTextProperty, value); } get { return (string)GetValue(ErrorTextProperty); } }
17 |
18 | public AuthenticatonPage(IAuth auth, AuthProvider ap)
19 | {
20 | // bind message to controls on page
21 | Label RequestLabel = new Label { XAlign = TextAlignment.Center, BindingContext = this };
22 | RequestLabel.SetBinding(Label.TextProperty, nameof(RequestText));
23 | Label ResponseLabel = new Label { XAlign = TextAlignment.Center, BindingContext = this };
24 | ResponseLabel.SetBinding(Label.TextProperty, nameof(ResponseText));
25 | Label ErrorLabel = new Label { XAlign = TextAlignment.Center, BindingContext = this };
26 | ErrorLabel.SetBinding(Label.TextProperty, nameof(ErrorText));
27 |
28 | Content = new StackLayout
29 | {
30 | Children = {
31 | new StackLayout // TODO: the display of request/response/error messages is really lame. Need help with better UI.
32 | {
33 | Children =
34 | {
35 | new Label { Text = "Request Info", HorizontalOptions = LayoutOptions.CenterAndExpand, BackgroundColor = Color.Blue },
36 | new ScrollView {
37 | HeightRequest = 150,
38 | Content =
39 | RequestLabel
40 | }
41 | }
42 | },
43 | new StackLayout
44 | {
45 | Children =
46 | {
47 | new Label { Text = "Response Info", HorizontalOptions = LayoutOptions.CenterAndExpand, BackgroundColor = Color.Blue },
48 | new ScrollView {
49 | HeightRequest = 150,
50 | Content =
51 | ResponseLabel
52 | }
53 | }
54 | },
55 | new StackLayout
56 | {
57 | Children =
58 | {
59 | new Label { Text = "Error Info", HorizontalOptions = LayoutOptions.CenterAndExpand, BackgroundColor = Color.Blue },
60 | new ScrollView {
61 | HeightRequest = 150,
62 | Content =
63 | ErrorLabel
64 | }
65 | },
66 | }
67 | }
68 | };
69 | if (!string.IsNullOrEmpty(ap.consumerKey))
70 | {
71 | Authenticate(auth.auth1, ap, AccountStore.Create().FindAccountsForService(ap.name));
72 | }
73 | else if (!string.IsNullOrEmpty(ap.clientId))
74 | {
75 | Authenticate(auth.auth2, ap, AccountStore.Create().FindAccountsForService(ap.name));
76 | }
77 | else
78 | {
79 | ErrorText = "Authenticator: Empty consumerKey (OAuth1) and clientId (OAuth2)";
80 | }
81 | }
82 |
83 | void Authenticate(IOAuth1Authenticator auth, AuthProvider ap, List accounts)
84 | {
85 | if (accounts.Count == 0)
86 | {
87 | auth.Completed += (sender, eventArgs) =>
88 | {
89 | if (eventArgs.IsAuthenticated)
90 | {
91 | try
92 | {
93 | AccountStore.Create().Save(eventArgs.Account, ap.name);
94 | PerformAuth1TestRequests(ap, eventArgs.Account);
95 | }
96 | catch (Exception ex)
97 | {
98 | ErrorText = ex.Message;
99 | }
100 | }
101 | else
102 | {
103 | ErrorText = "Authenticate: Not Authenticated";
104 | return;
105 | }
106 | };
107 | auth.Error += (sender, eventArgs) =>
108 | {
109 | ErrorText += "Authenticate: Error:" + eventArgs.Message + "\n";
110 | for (Exception inner = eventArgs.Exception; inner != null; inner = inner.InnerException)
111 | {
112 | ErrorText += "Message:" + inner.Message + "\n";
113 | }
114 | return;
115 | };
116 | try
117 | {
118 | auth.OAuth1Authenticator(ap.consumerKey, ap.consumerSecret, new Uri(ap.requestTokenUrl), new Uri(ap.authorizeUrl), new Uri(ap.accessTokenUrl), new Uri(ap.callbackUrl), null);
119 | }
120 | catch (Exception ex)
121 | {
122 | ErrorText += "Authenticate: Exception:";
123 | for (Exception inner = ex.InnerException; inner != null; inner = inner.InnerException)
124 | {
125 | ErrorText += "Message:" + inner.Message + "\n";
126 | }
127 | }
128 | }
129 | else
130 | PerformAuth1TestRequests(ap, accounts[0]); // TODO: implement error handling. If error is caused by expired token, renew token.
131 | }
132 |
133 | async void PerformAuth1TestRequests(AuthProvider ap, Account account)
134 | {
135 | foreach (KeyValuePair p in account.Properties)
136 | System.Diagnostics.Debug.WriteLine("Property: Key:" + p.Key + " Value:" + p.Value);
137 | try
138 | {
139 | foreach (string requestUrl in ap.apiRequests)
140 | {
141 | OAuth1Request request = new OAuth1Request("GET", new Uri(requestUrl), null, account, false);
142 | IResponse response = await request.GetResponseAsync();
143 | ResponseText = response.GetResponseText();
144 | }
145 | }
146 | catch (Exception ex)
147 | {
148 | ErrorText = "PerformAuth1TestRequests: Exception:";
149 | for (Exception inner = ex; inner != null; inner = inner.InnerException)
150 | {
151 | ErrorText += "Message:" + inner.Message + "\n";
152 | }
153 | foreach (KeyValuePair p in account.Properties)
154 | ErrorText += "Key:" + p.Key + " Value:" + p.Value + "\n";
155 | }
156 | }
157 |
158 | void Authenticate(IOAuth2Authenticator auth, AuthProvider ap, List accounts)
159 | {
160 | if (accounts.Count == 0)
161 | {
162 | auth.Completed += (sender, eventArgs) =>
163 | {
164 | if (eventArgs.IsAuthenticated)
165 | {
166 | try
167 | {
168 | AccountStore.Create().Save(eventArgs.Account, ap.name);
169 | PerformAuth2TestRequests(ap, eventArgs.Account);
170 | }
171 | catch (Exception ex)
172 | {
173 | ErrorText = ex.Message;
174 | }
175 | }
176 | else
177 | {
178 | ErrorText = "Authenticate: Not Authenticated";
179 | return;
180 | }
181 | };
182 | auth.Error += (sender, eventArgs) =>
183 | {
184 | ErrorText += "Authenticate: Error:" + eventArgs.Message + "\n";
185 | Exception ex = eventArgs.Exception;
186 | for (Exception inner = eventArgs.Exception; inner != null; inner = inner.InnerException)
187 | {
188 | ErrorText += "Message:" + inner.Message + "\n";
189 | }
190 | return;
191 | };
192 | try
193 | {
194 | if (ap.ForceRequestTypeOfCode)
195 | {
196 | auth.OAuth2Authenticator(ap.clientId, ap.scope, new Uri(ap.authorizeUrl), new Uri(ap.redirectUrl), "{0}?client_id={1}&redirect_uri={2}&response_type=code&scope={4}&state={5}");
197 | }
198 | else
199 | {
200 | auth.OAuth2Authenticator(ap.clientId, ap.scope, new Uri(ap.authorizeUrl), new Uri(ap.redirectUrl));
201 | }
202 | }
203 | catch (Exception ex)
204 | {
205 | ErrorText = "Authenticate: Exception:";
206 | for (Exception inner = ex.InnerException; inner != null; inner = inner.InnerException)
207 | {
208 | ErrorText += "Message:" + inner.Message + "\n";
209 | }
210 | foreach (KeyValuePair p in accounts[0].Properties)
211 | ErrorText += "Key:" + p.Key + " Value:" + p.Value + "\n";
212 | }
213 | }
214 | else
215 | PerformAuth2TestRequests(ap, accounts[0]); // TODO: implement error handling. If error is caused by expired token, renew token.
216 | }
217 |
218 | async void PerformAuth2TestRequests(AuthProvider ap, Account account)
219 | {
220 | try
221 | {
222 | ResponseText = ""; // clear response display string
223 | foreach (KeyValuePair p in account.Properties)
224 | System.Diagnostics.Debug.WriteLine("Property: Key:" + p.Key + " Value:" + p.Value);
225 | System.Diagnostics.Debug.WriteLine("PerformAuth2TestRequests: Count:" + ap.apiRequests.Count);
226 | foreach (string requestUrl in ap.apiRequests)
227 | {
228 | System.Diagnostics.Debug.WriteLine("PerformAuth2TestRequests: Url:" + requestUrl);
229 | ResponseText += "Request Url:" + requestUrl + "\n";
230 | OAuth2Request request = new OAuth2Request("GET", new Uri(requestUrl), null, account);
231 | if (!string.IsNullOrEmpty(ap.SubstituteRequestAccessToken))
232 | request.AccessTokenParameterName = ap.SubstituteRequestAccessToken;
233 | IResponse response = await request.GetResponseAsync();
234 | System.Diagnostics.Debug.WriteLine("PerformAuth2TestRequests: StatusCode:" + response.StatusCode + " ResponseUri:" + response.ResponseUri);
235 | System.Diagnostics.Debug.WriteLine("PerformAuth2TestRequests: Headers:");
236 | foreach (KeyValuePair h in response.Headers)
237 | System.Diagnostics.Debug.WriteLine("Header: Key:" + h.Key + " Value:" + h.Value);
238 | ResponseText += "Response(" + response.StatusCode + "):";
239 | string r = response.GetResponseText();
240 | ResponseText += r + "\n";
241 | }
242 | }
243 | catch (Exception ex)
244 | {
245 | ErrorText += "Exception: PerformAuth2TestRequests: Message:" + ex.Message + "\n";
246 | foreach (KeyValuePair p in account.Properties)
247 | ErrorText += "Key:" + p.Key + " Value:" + p.Value + "\n";
248 | }
249 | }
250 |
251 | string HostToDomain(string host)
252 | {
253 | System.Diagnostics.Debug.WriteLine("HostToDomain: host:" + host);
254 | Uri uri = new Uri(host);
255 | string[] hostParts = uri.Host.Split('.');
256 | int l = hostParts.Length;
257 | return hostParts[l - 2] + "." + hostParts[l - 1];
258 | }
259 | }
260 | }
261 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1/DoSomeWork.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1/DoSomeWork.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 |
4 | namespace OAuthForms1
5 | {
6 | public partial class DoSomeWork : ContentPage
7 | {
8 | public DoSomeWork()
9 | {
10 | InitializeComponent();
11 | }
12 | void OnShowAuthenticationProviders(object sender, EventArgs eventArgs)
13 | {
14 | Navigation.PushModalAsync(new ProviderPage());
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1/OAuthForms1.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 10.0
6 | Debug
7 | AnyCPU
8 | {24109515-F42F-4C85-9FFE-8871BCD132ED}
9 | Library
10 | Properties
11 | OAuthForms1
12 | OAuthForms1
13 | v4.5
14 | Profile111
15 | 512
16 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
17 |
18 |
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug\
25 | DEBUG;TRACE
26 | prompt
27 | 4
28 |
29 |
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 |
39 |
40 |
41 | DoSomeWork.xaml
42 |
43 |
44 |
45 |
46 |
47 |
48 | ..\..\packages\Newtonsoft.Json.6.0.8\lib\portable-net40+sl5+wp80+win8+wpa81\Newtonsoft.Json.dll
49 | True
50 |
51 |
52 | ..\..\packages\System.Runtime.Handles.4.0.0-beta-22816\lib\portable-wpa81+wp80+win80+net45+aspnetcore50\System.Runtime.Handles.dll
53 | True
54 |
55 |
56 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll
57 | True
58 |
59 |
60 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Platform.dll
61 | True
62 |
63 |
64 | ..\..\packages\Xamarin.Forms.1.4.2.6359\lib\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll
65 | True
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | Designer
75 | MSBuild:UpdateDesignTimeXaml
76 |
77 |
78 |
79 |
80 | {67f9d3a8-f71e-4428-913f-c37ae82cdb24}
81 | UAuth
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | README.txt
90 |
91 |
92 | ToDo.txt
93 |
94 |
95 |
96 |
97 |
98 |
99 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
100 |
101 |
102 |
103 |
110 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1/OAuthProviders.json:
--------------------------------------------------------------------------------
1 | // Obtain your own clientId and clientSecret from an OAuth providers website.
2 | // For OAuth2, implicit authorization (app-to-provider) only needs clientId. Explicit (server-to-provider) needs clientSecret.
3 | // Be careful about introducing errors (syntax, naming, typeof), they may cause mysterious exceptions to be thrown.
4 | // redirectUrl must be an explicit html page, not a default or domain name. redirectUrl may or may not have to be entered in your OAuth provider's registration info.
5 | // redirectUrl may or may not need to be https (vs http). http://httpbin.org/get is a handly redirectUrl, if allowed. http://localhost seems problematic.
6 | {
7 | "AuthProviders": [
8 | {
9 | "name": "Amazon",
10 | "image": "http://icons.iconarchive.com/icons/bokehlicia/pacifica/128/amazon-icon.png",
11 | "clientId": "amzn1.application-oa2-client.8dc1faa5eb08497194a32fdd33da2b8a",
12 | "clientSecret": "",
13 | "scope": "profile",
14 | "authorizeUrl": "https://www.amazon.com/ap/oa",
15 | "accessTokenUrl": "https://api.amazon.com/auth/O2/token",
16 | "redirectUrl": "https://httpbin.org/get", // redirectUrl can be any whitelisted https. To whitelist, enter url into provider's redirect list in their App's API console.
17 | "apiRequests": [ "https://api.amazon.com/auth/O2/tokeninfo", "https://api.amazon.com/user/profile" ], // example of multiple api calls
18 | "developerWebsite": "",
19 | "developerApiDocs": "https://images-na.ssl-images-amazon.com/images/G/01/lwa/dev/docs/website-developer-guide._TTH_.pdf",
20 | "developerAppConsole": "https://sellercentral.amazon.com/gp/homepage.html",
21 | "developerOAuthDocs": "",
22 | "developerAppRegistration": "",
23 | "sampleAuthorizeGet": "",
24 | "sampleAccessTokenGet": "",
25 | "comment": ""
26 | },
27 | {
28 | "name": "Dropbox",
29 | "image": "http://icons.iconarchive.com/icons/danleech/simple/128/dropbox-icon.png",
30 | "clientId": "36gw9662l7kajue",
31 | "clientSecret": "",
32 | "scope": "",
33 | "authorizeUrl": "https://www.dropbox.com/1/oauth2/authorize",
34 | "accessTokenUrl": "https://www.dropbox.com/1/oauth2/access_token",
35 | "redirectUrl": "https://httpbin.org/get",
36 | "apiRequests": [ "https://api.dropbox.com/1/account/info" ],
37 | "developerWebsite": "https://www.dropbox.com/developers",
38 | "developerApiDocs": "https://www.dropbox.com/developers/core/docs",
39 | "developerAppConsole": "https://www.dropbox.com/developers/apps",
40 | "developerOAuthDocs": "",
41 | "developerAppRegistration": "",
42 | "sampleAuthorizeGet": "",
43 | "sampleAccessTokenGet": "",
44 | "comment": ""
45 | },
46 | {
47 | "name": "Facebook",
48 | "image": "http://icons.iconarchive.com/icons/hopstarter/social-networking/128/Facebook-icon.png",
49 | "clientId": "1588540051400251",
50 | "clientSecret": "",
51 | "scope": "",
52 | "authorizeUrl": "https://m.facebook.com/dialog/oauth/",
53 | "accessTokenUrl": "",
54 | "redirectUrl": "http://www.facebook.com/connect/login_success.html",
55 | "apiRequests": [ "https://graph.facebook.com/me" ],
56 | "developerWebsite": "https://developers.facebook.com/",
57 | "developerApiDocs": "",
58 | "developerAppConsole": "https://developers.facebook.com/apps/",
59 | "developerOAuthDocs": "",
60 | "developerAppRegistration": "",
61 | "sampleAuthorizeGet": "",
62 | "sampleAccessTokenGet": "",
63 | "comment": ""
64 | },
65 | {
66 | "name": "GitHub (post-auth error)",
67 | "image": "http://icons.iconarchive.com/icons/artcore-illustrations/artcore-4/128/github-icon.png",
68 | "clientId": "d449719ebac8374c3b19",
69 | "clientSecret": "",
70 | "scope": "user",
71 | "authorizeUrl": "https://github.com/login/oauth/authorize",
72 | "accessTokenUrl": "https://github.com/login/oauth/access_token",
73 | "redirectUrl": "https://www.facebook.com/connect/login_success.html",
74 | "apiRequests": [ "https://api.github.com/user" ],
75 | "developerWebsite": "https://developer.github.com/",
76 | "developerApiDocs": "https://developer.github.com/v3/",
77 | "developerAppConsole": "https://github.com/settings/developers",
78 | "developerOAuthDocs": "",
79 | "developerAppRegistration": "",
80 | "sampleAuthorizeGet": "",
81 | "sampleAccessTokenGet": "",
82 | "SubstituteRedirectUrlAccessToken": "code", // fix non-standard issue
83 | "comment": ""
84 | },
85 | {
86 | "name": "Google",
87 | "image": "http://icons.iconarchive.com/icons/graphics-vibe/simple-rounded-social/128/google-icon.png",
88 | "clientId": "232694463747-kvgavlaaekt3jj6vb934koptl6rsv1q2.apps.googleusercontent.com",
89 | "clientSecret": "",
90 | "scope": "profile",
91 | "authorizeUrl": "https://accounts.google.com/o/oauth2/auth",
92 | "accessTokenUrl": "https://accounts.google.com/o/oauth2/token",
93 | "redirectUrl": "http://httpbin.org/get", // some URLs that should work are not. See comments. or urn:ietf:wg:oauth:2.0:oob
94 | "apiRequests": [ "https://maps.googleapis.com/maps/api/geocode/json?address=122+Flinders+St,+Darlinghurst,+NSW,+Australia&sensor=false" ],
95 | "developerWebsite": "",
96 | "developerApiDocs": "",
97 | "developerAppConsole": "",
98 | "developerOAuthDocs": "",
99 | "developerAppRegistration": "",
100 | "sampleAuthorizeGet": "",
101 | "sampleAccessTokenGet": "",
102 | "comment": "redirect can be any URI specified in (API & auth->credentials) menu including http://localhost or urn:ietf:wg:oauth:2.0:oob. However never could get my https URL or http://localhost to work."
103 | },
104 | {
105 | "name": "Instagram",
106 | "image": "http://icons.iconarchive.com/icons/designbolts/free-instagram/128/Active-Instagram-3-icon.png",
107 | "clientId": "75135792f5f941d6a378739eded4be4b",
108 | "clientSecret": "",
109 | "scope": "basic",
110 | "authorizeUrl": "https://api.instagram.com/oauth/authorize",
111 | "accessTokenUrl": "https://api.instagram.com/oauth/access_token",
112 | "redirectUrl": "https://www.facebook.com/connect/login_success.html", // not working: https://httpbin.org/get, https://httpbin.org/get, http://www.softworksltd.com
113 | "apiRequests": [ "https://api.instagram.com/v1/locations/search?lat=48.858844&lng=2.294351" ],
114 | "developerWebsite": "https://instagram.com/developer/",
115 | "developerApiDocs": "",
116 | "developerAppConsole": "https://instagram.com/developer/clients/manage/",
117 | "developerOAuthDocs": "",
118 | "developerAppRegistration": "",
119 | "sampleAuthorizeGet": "",
120 | "sampleAccessTokenGet": "",
121 | "comment": ""
122 | },
123 | {
124 | "name": "LinkedIn (post-auth error)",
125 | "image": "http://icons.iconarchive.com/icons/graphics-vibe/simple-rounded-social/128/linkedin-icon.png",
126 | "clientId": "77grq91zb2yncm",
127 | "clientSecret": "",
128 | "scope": "r_basicprofile", // emply defaults to all
129 | "authorizeUrl": "https://www.linkedin.com/uas/oauth2/authorization",
130 | "accessTokenUrl": "https://www.linkedin.com/uas/oauth2/accessToken",
131 | "redirectUrl": "https://httpbin.org/get", // not working: www.facebook.com/connect/login_success.html (hang), https://just27.justhost.com/~softwork/index.html (404)
132 | "apiRequests": [ "https://api.linkedin.com/v1/people/~?format=json" ],
133 | "developerWebsite": "https://developer.linkedin.com/",
134 | "developerApiDocs": "https://apigee.com/resources/linkedin",
135 | "developerAppConsole": "https://www.linkedin.com/developer/apps",
136 | "developerOAuthDocs": "",
137 | "developerAppRegistration": "",
138 | "sampleAuthorizeGet": "",
139 | "sampleAccessTokenGet": "",
140 | "ForceRequestTypeOfCode": true, // fix non-standard issue
141 | "SubstituteRedirectUrlAccessToken": "code", // fix non-standard issue
142 | "SubstituteRequestAccessToken": "oauth2_access_token", // fix non-standard issue
143 | "comment": "LinkedIn OAuth2 requires implicit response: response_type=code&state={random number}. Note oauth2_access_token instead of access_token"
144 | },
145 | {
146 | "name": "Meetup (OAuth1)",
147 | "image": "http://icons.iconarchive.com/icons/position-relative/social-2/128/meetup-icon.png",
148 | "consumerKey": "82lqehr896pdovjhij4akthg7n",
149 | "consumerSecret": "rqgqtu66hvct9hf9av0bel6np9",
150 | "requestTokenUrl": "https://api.meetup.com/oauth/request",
151 | "authorizeUrl": "https://secure.meetup.com/authorize",
152 | "accessTokenUrl": "https://api.meetup.com/oauth/access",
153 | "callbackUrl": "http://www.softworksltd.com/index.html", // redirectUrl must be within registered website
154 | "apiRequests": [ "https://api.meetup.com/cities" ],
155 | "developerWebsite": "http://www.meetup.com/meetup_api",
156 | "developerApiDocs": "http://www.meetup.com/meetup_api",
157 | "developerAppConsole": "https://secure.meetup.com/meetup_api",
158 | "developerOAuthDocs": "",
159 | "developerAppRegistration": "",
160 | "sampleAuthorizeGet": "",
161 | "sampleAccessTokenGet": "",
162 | "comment": "Uses OAuth1"
163 | },
164 | {
165 | "name": "Meetup (OAuth2)",
166 | "image": "http://icons.iconarchive.com/icons/position-relative/social-2/128/meetup-icon.png",
167 | "clientId": "82lqehr896pdovjhij4akthg7n",
168 | "clientSecret": "",
169 | "scope": "basic",
170 | "authorizeUrl": "https://secure.meetup.com/oauth2/authorize",
171 | "accessTokenUrl": "https://secure.meetup.com/oauth2/access",
172 | "redirectUrl": "http://www.softworksltd.com/index.html", // must explicitly specify an html page. redirectUrl must be within the developer's domain as registered with the provider.
173 | "apiRequests": [ "https://api.meetup.com/cities" ],
174 | "developerWebsite": "http://www.meetup.com/meetup_api",
175 | "developerApiDocs": "http://www.meetup.com/meetup_api",
176 | "developerAppConsole": "https://secure.meetup.com/meetup_api",
177 | "developerOAuthDocs": "",
178 | "developerAppRegistration": "",
179 | "sampleAuthorizeGet": "",
180 | "sampleAccessTokenGet": "",
181 | "comment": ""
182 | },
183 | {
184 | "name": "Microsoft",
185 | "image": "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcTXGtu_amk0MXq9hZ1LsDKyogbpJXWdw6jBDqim59odwdoyHL6ywQ",
186 | "clientId": "0000000048157786",
187 | "clientSecret": "",
188 | "scope": "wl.signin wl.basic wl.skydrive wl.photos",
189 | "authorizeUrl": "https://login.live.com/oauth20_authorize.srf",
190 | "accessTokenUrl": "https://login.live.com/oauth20_desktop.srf",
191 | "redirectUrl": "http://www.softworksltd.com/index.html", // redirectUrl must be within the developer's domain as registered with the provider.
192 | "apiRequests": [ "https://apis.live.net/v5.0/me", "https://apis.live.net/v5.0/me/albums" ], // example of multiple api calls
193 | "developerWebsite": "",
194 | "developerApiDocs": "",
195 | "developerAppConsole": "https://outlook.office365.com/api/beta/me/userphoto",
196 | "developerOAuthDocs": "",
197 | "developerAppRegistration": "",
198 | "sampleAuthorizeGet": "",
199 | "sampleAccessTokenGet": "",
200 | "comment": ""
201 | },
202 | {
203 | "name": "PayPal (live) (missing clientId)", // live
204 | "image": "http://icons.iconarchive.com/icons/alecive/flatwoken/128/Apps-Paypal-B-icon.png",
205 | "clientId": "",
206 | "clientSecret": "",
207 | "scope": "openid", // profile
208 | "authorizeUrl": "https://www.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize",
209 | "accessTokenUrl": "https://api.paypal.com/v1/oauth2/token",
210 | "redirectUrl": "http://httpbin.org/get",
211 | "apiRequests": [ "https://api.paypal.com/v1/identity/openidconnect/userinfo/?schema=openid" ], // example of multiple api calls
212 | "developerWebsite": "https://developer.paypal.com/",
213 | "developerApiDocs": "",
214 | "developerAppConsole": "https://developer.paypal.com/developer/applications",
215 | "developerOAuthDocs": "",
216 | "developerAppRegistration": "",
217 | "sampleAuthorizeGet": "",
218 | "sampleAccessTokenGet": "",
219 | "ForceRequestTypeOfCode": true,
220 | "comment": ""
221 | },
222 | {
223 | "name": "PayPal (sandbox) (login issue)", // can't login. Must be able to login into () first?
224 | "image": "http://icons.iconarchive.com/icons/alecive/flatwoken/128/Apps-Paypal-B-icon.png",
225 | "clientId": "Acsybtx0AGQqUrpqUsLMByAAbAqDjQJ7MeoY_tUUmZlEJlHyRPpwVk0plxXAurIb7eVZ0xJ8A1q7K5Mx",
226 | "clientSecret": "",
227 | "scope": "openid", // profile
228 | "authorizeUrl": "https://www.sandbox.paypal.com/webapps/auth/protocol/openidconnect/v1/authorize",
229 | "accessTokenUrl": "https://api.sandbox.paypal.com/v1/oauth2/token",
230 | "redirectUrl": "http://httpbin.org/get",
231 | "apiRequests": [ "https://api.sandbox.paypal.com/v1/identity/openidconnect/userinfo/?schema=openid" ], // example of multiple api calls
232 | "developerWebsite": "https://developer.paypal.com/",
233 | "developerApiDocs": "",
234 | "developerAppConsole": "https://developer.paypal.com/developer/applications",
235 | "developerOAuthDocs": "",
236 | "developerAppRegistration": "",
237 | "sampleAuthorizeGet": "",
238 | "sampleAccessTokenGet": "",
239 | "ForceRequestTypeOfCode": true,
240 | "comment": ""
241 | },
242 | {
243 | "name": "StackOverflow (post-auth error)",
244 | "image": "http://icons.iconarchive.com/icons/limav/flat-gradient-social/128/Stackoverflow-icon.png",
245 | "clientId": "4872",
246 | "clientSecret": "",
247 | "scope": "",
248 | "authorizeUrl": "https://stackexchange.com/oauth",
249 | "accessTokenUrl": "https://stackexchange.com/oauth/access_token",
250 | "redirectUrl": "http://www.softworksltd.com/index.html", // redirectUrl must be within the developer's domain as registered with the provider.
251 | "apiRequests": [ "https://api.stackexchange.com/2.2/questions/me" ], // example of multiple api calls
252 | "developerWebsite": "",
253 | "developerApiDocs": "https://api.stackexchange.com/docs/authentication",
254 | "developerAppConsole": "http://stackapps.com/apps/oauth/",
255 | "developerOAuthDocs": "",
256 | "developerAppRegistration": "",
257 | "sampleAuthorizeGet": "",
258 | "sampleAccessTokenGet": "",
259 | "comment": ""
260 | },
261 | {
262 | "name": "Twitter",
263 | "image": "http://icons.iconarchive.com/icons/graphics-vibe/simple-rounded-social/128/twitter-icon.png",
264 | "consumerKey": "F5tWJ6jIxNMdOZsAvTBePQ",
265 | "consumerSecret": "uqwUjETSvX8li9IPFLAiuHqNQ7JvrYXBSlLR6K7DsQ",
266 | "requestTokenUrl": "https://api.twitter.com/oauth/request_token",
267 | "authorizeUrl": "https://api.twitter.com/oauth/authorize",
268 | "accessTokenUrl": "https://api.twitter.com/oauth/access_token",
269 | "callbackUrl": "http://twitter.com",
270 | "apiRequests": [ "https://api.twitter.com/1.1/statuses/home_timeline.json" ],
271 | "developerWebsite": "",
272 | "developerApiDocs": "",
273 | "developerAppConsole": "",
274 | "developerOAuthDocs": "",
275 | "developerAppRegistration": "",
276 | "sampleAuthorizeGet": "",
277 | "sampleAccessTokenGet": "",
278 | "comment": "Uses OAuth1"
279 | }
280 |
281 | ]
282 | }
283 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Resources;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("OAuthForms1")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("OAuthForms1")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: NeutralResourcesLanguage("en")]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1/Providers.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Reflection;
4 | using Xamarin.Forms;
5 |
6 | using UAuth;
7 |
8 | namespace OAuthForms1
9 | {
10 | // Json file bindings
11 | public class AuthProvider
12 | {
13 | // properties in common between authentication types
14 | public string name { get; set; }
15 | public string image { get; set; }
16 | public List apiRequests { get; set; }
17 |
18 | // shared OAuth properties
19 | public string authorizeUrl { get; set; }
20 | public string accessTokenUrl { get; set; }
21 |
22 | // OAuth1 specfic properties
23 | public string consumerKey { get; set; }
24 | public string consumerSecret { get; set; }
25 | public string requestTokenUrl { get; set; }
26 | public string callbackUrl { get; set; }
27 |
28 | // OAuth2 specific properties
29 | public string clientId { get; set; }
30 | public string clientSecret { get; set; }
31 | public string scope { get; set; }
32 | public string redirectUrl { get; set; }
33 |
34 | // Urls helpful to developers to learn and use the providers APIs
35 | public string developerWebsite { get; set; }
36 | public string developerApiDocs { get; set; }
37 | public string developerAppConsole { get; set; }
38 | public string developerOAuthDocs { get; set; }
39 | public string developerAppRegistration { get; set; }
40 |
41 | // sample OAuth calls
42 | public string sampleAuthorizeGet { get; set; }
43 | public string sampleAccessTokenGet { get; set; }
44 |
45 | // Fixes to quirky implementations of OAuth
46 | public bool ForceRequestTypeOfCode { get; set; } // fix non-standard issue
47 | public string SubstituteRedirectUrlAccessToken { get; set; } // fix non-standard issue
48 | public string SubstituteRequestAccessToken { get; set; } // fix non-standard issue
49 |
50 | // notes
51 | public string comments { get; set; }
52 | }
53 |
54 | public class AuthProvidersList
55 | {
56 | public List AuthProviders { get; set; }
57 | }
58 |
59 | public class AuthProviders
60 | {
61 | public Dictionary AuthProviderDictionary = new Dictionary();
62 | public AuthProviders()
63 | {
64 | Type classType = typeof(AuthProvidersList); // TODO: find way of not hardcoding class name
65 | TypeInfo classTypeInfo = classType.GetTypeInfo();
66 | Assembly assemblyType = classTypeInfo.Assembly;
67 | foreach (var res in assemblyType.GetManifestResourceNames())
68 | System.Diagnostics.Debug.WriteLine("found resource: " + res);
69 |
70 | System.IO.Stream stream = assemblyType.GetManifestResourceStream(classType.Namespace + ".OAuthProviders.json");
71 | System.IO.StreamReader sr = new System.IO.StreamReader(stream);
72 | string json = sr.ReadToEnd();
73 | // TODO: implement error checking and handling of JSON
74 | AuthProvidersList providers = Newtonsoft.Json.JsonConvert.DeserializeObject(json);
75 | foreach (AuthProvider ap in providers.AuthProviders)
76 | AuthProviderDictionary.Add(ap.name, ap);
77 | #if true // removes saved accounts. called once on startup.
78 | foreach (AuthProvider ap in providers.AuthProviders)
79 | foreach (Account account in AccountStore.Create().FindAccountsForService(ap.name))
80 | AccountStore.Create().Delete(account, ap.name);
81 | #endif
82 | }
83 | }
84 |
85 | public class ProviderPage : ContentPage
86 | {
87 | public ProviderPage()
88 | {
89 | AuthProviders aps = new AuthProviders();
90 | Dictionary AuthProviders = aps.AuthProviderDictionary;
91 |
92 | StackLayout ProviderList = new StackLayout();
93 | // TODO: what to do if no valid providers?
94 | foreach (AuthProvider p in AuthProviders.Values)
95 | {
96 | Button b = new Button() { BackgroundColor = Color.White, HorizontalOptions = LayoutOptions.FillAndExpand};
97 | Image i = new Image() { BackgroundColor = Color.White, HeightRequest = 30 };
98 | StackLayout sl = new StackLayout { BackgroundColor = Color.White, Orientation = StackOrientation.Horizontal, Children = { i, b } };
99 | ProviderList.Children.Add(sl);
100 | #if false
101 | // Button image is too inflexible for use. It only offers resource files as the source and not URIs or other image forms.
102 | //string defaultImageFolder = Device.OnPlatform(iOS: "Images/", Android: "", WinPhone: "Images/");
103 | //b.Image = defaultImageFolder + (string.IsNullOrEmpty(p.image) ? "oauth.png" : p.image);
104 | #endif
105 | if (string.IsNullOrEmpty(p.image))
106 | i.Source = ImageSource.FromResource("OAuthForms1.oauth.jpg"); // PCL - must have "Build Action" set to "Embedded Resource". Note use of namespace.
107 | else
108 | i.Source = ImageSource.FromUri(new Uri(p.image));
109 | b.Text = p.name;
110 | b.Clicked += (s, e) => { Navigation.PushModalAsync(new AuthenticatonPage(Auth.auth, AuthProviders[((Button)b).Text])); };
111 | }
112 | Content = new StackLayout
113 | {
114 | VerticalOptions = LayoutOptions.Center,
115 | Children = {
116 | new ScrollView {
117 | Content =
118 | ProviderList
119 | }
120 | }
121 | };
122 | }
123 | }
124 | }
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1/oauth.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/OAuthForms1/OAuthForms1/oauth.jpg
--------------------------------------------------------------------------------
/OAuthForms1/OAuthForms1/OAuthForms1/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/OAuthForms1/README.txt:
--------------------------------------------------------------------------------
1 |
2 | Synopsis: Complete C# cross-platform mobile app. Demonstrates how to request OAuth credentials for enabling the execution of APIs. Implements Xamarin.Auth in Xamarin.Forms in a natural, PCL-compatible way. Uses a JSON data file to provide a selection of OAuth logins. Choose from a list of OAuth providers including Amazon, Facebook, Google, and more.
3 |
4 | Features
5 | 1. Easy and powerful implementation of Xamarin.Auth in Xamarin.Forms.
6 | 2. Complete C# cross-platform mobile app [not yet, Android only now].
7 | 3. Use Xamarin.Auth as if it was a native PCL library. No need to push logic into platform dependent files.
8 | 4. Demonstrates usage of most Xamarin.Auth members.
9 | 5. Compatible with (most) OAuth1 and OAuth2 providers.
10 | 6. Uses an easily configurable embedded JSON file to drive execution. File contains OAuth providers, credentials, URLs and much more.
11 | 7. Working examples of calling many different OAuth providers.
12 | 8. Contains logic necessary to handle quirky OAuth implementations.
13 | 9. Easily integratable Xamarin.Auth implementation ready for inclusion in your projects.
14 | 10. Sub-classes Xamarin.Auth in PCL for easy use.
15 | 11. Designed to be compatible with existing and future versions of Xamarin.Auth.
16 | 12. Easy way to test OAuth implementations. Simply enter a new OAuth provider implementation in the JSON file.
17 | 13. Demonstrates use of saving/reusing/deleting credentials to minimize repeated authentications.
18 | 14. Demonstrates use of refreshing expired authorizations [not yet].
19 | 15. Demonstrates use of binding to Xamarin.Forms controls.
20 | 16. Easier to use than WebView and non-PCL solutions.
21 | 17. Complete source code provided. No restrictions on use.
22 |
23 | Dependencies.
24 | 1. Xamarin.Forms
25 | 2. Xamarin.Auth
26 | 3. Newtonsoft.Json
27 | 4. Visual Studio 2015
28 |
29 | Summary of Current Status and Project Intent
30 | This project is intended as a sample of using Xamarin.Auth in Xamarin.Forms. My hopes are that people contribute new providers, enhancements and fixes. As of this writing only Android is supported. iOS and WinPhone are coded but not debugged. The following providers are not fully working; GitHub, LinkedIn, PayPal, StackOverflow.
31 |
32 | FAQ
33 | 1. How do I add a new provider?
34 | -- Add a new provider object to OAuthProviders.json. To do so, just copy another provider and fill in the details. If your provider is OAuth1, copy an OAuth1 object, same with OAuth2 to OAuth2.
35 | 2. I created a new OAuth2 provider object in OAuthProviders.json. Why doesn't it work?
36 | -- Your clientId property may be wrong.
37 | -- Your authorization or token endpoint properties may be wrong.
38 | -- Your redirectUrl property may not conform to the rules of your provider. Some providers require https://. Some require the redirect URL be within the domain specified when you registered at the provider.
39 | -- If all of the above are correct, your provider may have a quirky implementation of OAuth2. See the LinkedIn object as an example of how to fix quirks.
40 | 3. Is it flexible enough to handle non-standard or quirky OAuth logins?
41 | -- So far all providers work.
42 | 4. Is this project useful to test new authorizations?
43 | -- Yes. See "How do I add a new provider?".
44 | 5. How do I test APIs after authorization succeeds?
45 | -- Yes. OAuthProviders.json has a property "apiRequests" which specifieds a list of GET requests to be executed after successful authorization.
46 | 6. What Xamarin.Auth members are not fully implemented?
47 | -- See uauthdefs.cs for "ToDo" or "Not implemented". As of this writing,
48 | 7. What providers don't work?
49 | -- The following providers fully authenticate but the GET tests in OAuthProviders.json.apiRequests fail; GitHub, LinkedIn, StackOverflow. Reason unknown.
50 | -- The following providers display an authentication page but reject my login email/password; PayPal (Auth1 and Auth2). Reason unknown.
51 | 8. What platforms don't work?
52 | -- As of this writing, src/uauthimpl.cs is working on Android. The file needs the addition of platform specific code to support iPhone and WinPhone, perhaps an additional 12 lines of code for each platform.
53 |
54 | Project Structure
55 | 1. OAuthForms1.sln is the solution file containing the following projects.
56 | 2. OAuthForms1.csproj is the sample mobile app. It uses Xamarin.Forms (PCL) and Xamarin.Auth sub-classing. This project contains a default OAuth icon (EmbeddedResoruce). Also contains the all important JSON data file (EmbeddedResource).
57 | 3. UAuth.csproj is a PCL project containing Xamarin.XAuth sub-classing definitions. Composed of one source file.
58 | 4. OAuthForms1.(Droid|iOS|WinPhone) are the platform specific projects. Each project is as minimal as possible, containing just one link to the subclassed Xamarin.Auth implementation.
59 | 5. src folder contains Xamarin.Forms sub-classing. These files are platform independent. They should not be copied into projects, use "Add as Link" instead.
60 | 6. Xamarin.Auth - Optional. Either install source from GitHub or include from Nuget.
61 |
62 | How to Create your Own Project
63 | 1. Add Xamarin.Auth to your own project; use Nuget reference or download source from GitHub as was done in OAuthForms1.sln sample.
64 | 2. For each project needing Xamarin.Auth, add a reference to UAuth. Either add a reference to the dll, or add UAuth.csproj to your solution.
65 | 3. Add *a link* (best not to add a copy) of src/uauthimpl.cs to each platform specific project. The source code within uauthimpl.cs will correctly compile as it contains cross-platform code.
66 |
67 | If you'd like to contribute to the
68 | 1. Add/test new providers.
69 | 2. Implement missing subclassing members in oauthdefs.cs and oauthimpl.cs.
70 | 3. Debug failing providers (GitHub, LinkedIn, PayPal, StackOverflow).
71 | 4. Implement iOS compatibility in src/oauthimpl.c.
72 |
73 |
--------------------------------------------------------------------------------
/OAuthForms1/ToDo.txt:
--------------------------------------------------------------------------------
1 | Document todo:
2 | 1. Only tetsted on Android
3 | 2. Document interesting bits: button image alternative, fix1, fix2, fix3, embedded resource
4 | 3. broken: github, linkedin, paypal, stackoverflow
5 | 4. curl is helpful but curl documentation is very helpful.
6 |
7 | OAuthForms1 todo:
8 | 1. I - Implement token renewal on startup.
9 | 2. possible to cancel authorization page?
10 | 3. implement long press of provider button to delete Account info. Prompt will occur next time.
11 | 4. is there an issue with restarting app and Accounts not persisting correctly?
12 | 5. in authorization class, change page type from content page to navigation page.
13 | 6. implement other ways to specify provider images. Allow actual icon data instead of only Urls.
14 | 7. persist provider image icons. use minimal size and bandwith.
15 |
16 | UOauth todo:
17 | 1. I - Implement iPhone and Windows 8.
18 | 2. Implement basic authentication.
19 |
20 | provider todo:
21 | 1. fix Paypal login error
22 | 2. fix "more than one error" in github, linkedin, stackoverflow
23 |
24 | OAuthProviders: json todo:
25 | 1. I - need to remove consumer secret?
26 | 2. add more providers into OAuthProviders.json.
27 | 3. fill in sample urls with curl, raw http request
28 |
--------------------------------------------------------------------------------
/OAuthForms1/UAuth/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Resources;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("UAuth")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("UAuth")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: NeutralResourcesLanguage("en")]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
--------------------------------------------------------------------------------
/OAuthForms1/UAuth/UAuth.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 10.0
6 | Debug
7 | AnyCPU
8 | {67F9D3A8-F71E-4428-913F-C37AE82CDB24}
9 | Library
10 | Properties
11 | UAuth
12 | UAuth
13 | v4.5
14 | Profile259
15 | 512
16 | {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
17 |
18 |
19 |
20 |
21 | true
22 | full
23 | false
24 | bin\Debug\
25 | DEBUG;TRACE
26 | prompt
27 | 4
28 |
29 |
30 | pdbonly
31 | true
32 | bin\Release\
33 | TRACE
34 | prompt
35 | 4
36 |
37 |
38 |
39 | uauthdefs.cs
40 |
41 |
42 |
43 |
44 |
45 | ..\packages\Xamarin.Forms.1.3.3.6323\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll
46 | True
47 |
48 |
49 | ..\packages\Xamarin.Forms.1.3.3.6323\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll
50 | True
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
61 |
62 |
63 |
64 |
71 |
--------------------------------------------------------------------------------
/OAuthForms1/UAuth/obj/Debug/UAuth.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BSalita/XamarinAuthInForms/9990259aa2fb9a5f09721f57fa1db28899c9161b/OAuthForms1/UAuth/obj/Debug/UAuth.pdb
--------------------------------------------------------------------------------
/OAuthForms1/UAuth/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/OAuthForms1/packages/repositories.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/OAuthForms1/src/uauthdefs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace UAuth
5 | {
6 | public static class Auth // globals
7 | {
8 | public static IAuth auth;
9 | }
10 |
11 | public interface IOAuth1Request
12 | {
13 | System.Threading.Tasks.Task GetResponseAsync();
14 | System.Threading.Tasks.Task GetResponseAsync(System.Threading.CancellationToken cancellationToken);
15 | }
16 |
17 | public interface IOAuth2Request
18 | {
19 | System.Threading.Tasks.Task GetResponseAsync();
20 | System.Threading.Tasks.Task GetResponseAsync(System.Threading.CancellationToken cancellationToken);
21 | string AccessTokenParameterName { get; set; }
22 | }
23 |
24 | public interface IResponse // both OAuth1 and OAuth2
25 | {
26 | IDictionary Headers { get; }
27 | Uri ResponseUri { get; }
28 | int StatusCode { get; } // should be System.Net.HttpStatusCode
29 | //System.IO.Stream GetResponseStream(); // not implemented
30 | string GetResponseText();
31 | }
32 |
33 | public class Account // may have to create IAccount interface
34 | {
35 | public object xAccount;
36 | public string Username { get; }
37 | public Dictionary Properties { get; }
38 | //public CookieContainer Cookies { get; } // not implemented
39 | public Account( object Account, Dictionary Properties, string Username)
40 | {
41 | this.xAccount = Account;
42 | this.Properties = Properties;
43 | this.Username = Username;
44 | }
45 | }
46 |
47 | public interface IAccountStore
48 | {
49 | IAccountStore xCreate();
50 | List FindAccountsForService(string serviceId);
51 | void Save(Account account, string serviceId);
52 | void Delete(Account account, string serviceId);
53 | }
54 |
55 | public class AccountStore : IAccountStore
56 | {
57 | public static IAccountStore xAccountStore;
58 | public static IAccountStore Create() { return xAccountStore.xCreate(); }
59 | public IAccountStore xCreate() { return xAccountStore.xCreate(); }
60 | public List FindAccountsForService(string serviceId) { return xAccountStore.FindAccountsForService(serviceId); }
61 | public void Save(Account account, string serviceId) { xAccountStore.Save(account, serviceId); }
62 | public void Delete(Account account, string serviceId) { xAccountStore.Delete(account, serviceId); }
63 | }
64 |
65 | public delegate System.Threading.Tasks.Task GetUsernameAsyncFunc(IDictionary accountProperties); // TODO: not implemented
66 |
67 | public class AuthenticatorCompletedEventArgs : EventArgs
68 | {
69 | public bool IsAuthenticated { get { return Account != null; } }
70 | public Account Account { get; }
71 | public AuthenticatorCompletedEventArgs(Account account)
72 | {
73 | Account = account;
74 | }
75 | }
76 |
77 | public class AuthenticatorErrorEventArgs : EventArgs
78 | {
79 | public string Message { get; }
80 | public Exception Exception { get; }
81 | public AuthenticatorErrorEventArgs(string message, Exception exception)
82 | {
83 | Message = message;
84 | Exception = Exception;
85 | }
86 | }
87 |
88 | public class OAuth1Request : IOAuth1Request
89 | {
90 | private IOAuth1Request request;
91 | public OAuth1Request(string method, Uri url, Dictionary parameters, Account account, bool includeMultiPartInSignature)
92 | {
93 | request = Auth.auth.auth1.OAuth1Request(method, url, parameters, account, includeMultiPartInSignature);
94 | }
95 | public System.Threading.Tasks.Task GetResponseAsync() { return request.GetResponseAsync(); }
96 | public System.Threading.Tasks.Task GetResponseAsync(System.Threading.CancellationToken cancellationToken) { return request.GetResponseAsync(cancellationToken); }
97 | }
98 |
99 | public class OAuth2Request : IOAuth2Request
100 | {
101 | IOAuth2Request request;
102 | public OAuth2Request(string method, Uri url, Dictionary parameters, Account account)
103 | {
104 | request = Auth.auth.auth2.OAuth2Request(method, url, parameters, account);
105 | }
106 | public System.Threading.Tasks.Task GetResponseAsync() { return request.GetResponseAsync(); }
107 | public System.Threading.Tasks.Task GetResponseAsync(System.Threading.CancellationToken cancellationToken) { return request.GetResponseAsync(cancellationToken); }
108 | public string AccessTokenParameterName { get { return request.AccessTokenParameterName; } set { request.AccessTokenParameterName = value; } }
109 | }
110 |
111 | public interface IOAuth1Authenticator
112 | {
113 | void OAuth1Authenticator(string consumerKey, string consumerSecret, Uri requestTokenUrl, Uri authorizeUrl, Uri accessTokenUrl, Uri callbackUrl, GetUsernameAsyncFunc getUsernameAsync);
114 | IOAuth1Request OAuth1Request(string method, Uri url, Dictionary parameters, Account account, bool includeMultiPartInSignature);
115 | event EventHandler Completed;
116 | event EventHandler Error;
117 | }
118 |
119 | public interface IOAuth2Authenticator
120 | {
121 | void OAuth2Authenticator(string clientId, string scope, Uri authorizeUrl, Uri redirectUrl);
122 | void OAuth2Authenticator(string clientId, string scope, Uri authorizeUrl, Uri redirectUrl, string replacementFormatUrl);
123 | void OAuth2Authenticator(string clientId, string clientSecret, string scope, Uri authorizeUrl, Uri redirectUrl, Uri accessTokenUrl, GetUsernameAsyncFunc getUsernameAsync);
124 | IOAuth2Request OAuth2Request(string method, Uri url, Dictionary parameters, Account account);
125 | event EventHandler Completed;
126 | event EventHandler Error;
127 | }
128 |
129 | public interface IAuth
130 | {
131 | IOAuth1Authenticator auth1 { get; set; }
132 | IOAuth2Authenticator auth2 { get; set; }
133 | }
134 | }
135 |
--------------------------------------------------------------------------------
/OAuthForms1/src/uauthimpl.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | #if SILVERLIGHT
4 | using System.Windows.Navigation;
5 | #endif
6 | using UAuth;
7 |
8 | namespace UAuthImpl
9 | {
10 | public class Auth : IAuth
11 | {
12 | public IOAuth1Authenticator auth1 { get; set; }
13 | public IOAuth2Authenticator auth2 { get; set; }
14 | #if __ANDROID__
15 | public static Android.App.Activity context;
16 | public Auth(Android.App.Activity pContext)
17 | {
18 | context = pContext;
19 | #elif __IOS__
20 | public static MonoTouch.Dialog.DialogViewController dialog; // not sure about static
21 | public Auth()
22 | {
23 | #elif SILVERLIGHT
24 | public Auth()
25 | {
26 | #endif
27 | new AccountStoreImpl(); // invoke static constructor
28 | auth1 = new OAuth1AuthenticatorImpl();
29 | auth2 = new OAuth2AuthenticatorImpl();
30 | }
31 | }
32 |
33 | public class BaseOAuth2Authenticator : Xamarin.Auth.OAuth2Authenticator
34 | {
35 | string replacementUrlFormat;
36 | public BaseOAuth2Authenticator(string clientId, string scope, Uri authorizeUrl, Uri redirectUrl) : base(clientId, scope, authorizeUrl, redirectUrl)
37 | {
38 | this.replacementUrlFormat = null;
39 | }
40 |
41 | public BaseOAuth2Authenticator(string clientId, string scope, Uri authorizeUrl, Uri redirectUrl, string replacementUrlFormat) : base(clientId, scope, authorizeUrl, redirectUrl)
42 | {
43 | this.replacementUrlFormat = replacementUrlFormat;
44 | }
45 |
46 | public BaseOAuth2Authenticator(string clientId, string clientSecret, string scope, Uri authorizeUrl, Uri redirectUrl, Uri accessTokenUrl, GetUsernameAsyncFunc getUsernameAsync = null) : base(clientId, clientSecret, scope, authorizeUrl, redirectUrl, accessTokenUrl)
47 | {
48 | this.replacementUrlFormat = null; // replacementUrlFormat not implemented
49 | }
50 |
51 | protected async override void OnRedirectPageLoaded(Uri url, IDictionary query, IDictionary fragment)
52 | {
53 | System.Diagnostics.Debug.WriteLine("OnRedirectPageLoaded url:" + url);
54 | foreach (KeyValuePair p in query)
55 | System.Diagnostics.Debug.WriteLine("query: Key:" + p.Key + " Value:" + p.Value);
56 | foreach (KeyValuePair p in fragment)
57 | System.Diagnostics.Debug.WriteLine("fragment: Key:" + p.Key + " Value:" + p.Value);
58 | await System.Threading.Tasks.Task.Delay(2000); // TODO: find another way to pause on redirect page.
59 | // Fixes SubstituteRedirectUrlAccessToken issue but just do for every site
60 | if (!fragment.Keys.Contains("access_token") && query.Keys.Contains("code")) // fixes missing access_token: GitHub, LinkedIn
61 | fragment.Add("access_token", query["code"]);
62 | base.OnRedirectPageLoaded(url, query, fragment);
63 | }
64 |
65 | public async override System.Threading.Tasks.Task GetInitialUrlAsync()
66 | {
67 | // just return if no replacement requested
68 | if (string.IsNullOrEmpty(replacementUrlFormat))
69 | return await base.GetInitialUrlAsync();
70 |
71 | // get base class Uri
72 | System.Diagnostics.Debug.WriteLine("GetUriFromTaskUri: replacementUrlFormat:" + replacementUrlFormat);
73 | Uri uri = await base.GetInitialUrlAsync();
74 | System.Diagnostics.Debug.WriteLine("GetUriFromTaskUri: base.uri:" + uri);
75 |
76 | // need to extract state query string from base Uri because its scope isn't public.
77 | string baseUrl = uri.OriginalString;
78 | int stateIndex = baseUrl.LastIndexOf("&state=");
79 | string requestState = baseUrl.Substring(stateIndex + "&state=".Length);
80 |
81 | // verify that the base Url is same as our supposedly identical procedure. If not, there must be a code change in a new version of base class.
82 | string redoUrl = string.Format(
83 | "{0}?client_id={1}&redirect_uri={2}&response_type={3}&scope={4}&state={5}",
84 | AuthorizeUrl.AbsoluteUri,
85 | Uri.EscapeDataString(ClientId),
86 | Uri.EscapeDataString(RedirectUrl.AbsoluteUri),
87 | AccessTokenUrl == null ? "token" : "code",
88 | Uri.EscapeDataString(Scope),
89 | Uri.EscapeDataString(requestState));
90 | if (baseUrl != redoUrl)
91 | throw new ArgumentException("GetInitialUrlAsync: Url comparison failure: base: " + baseUrl + " redo:" + redoUrl);
92 |
93 | // format replacement Uri
94 | uri = new Uri(string.Format(
95 | replacementUrlFormat,
96 | AuthorizeUrl.AbsoluteUri,
97 | Uri.EscapeDataString(ClientId),
98 | Uri.EscapeDataString(RedirectUrl.AbsoluteUri),
99 | AccessTokenUrl == null ? "token" : "code",
100 | Uri.EscapeDataString(Scope),
101 | Uri.EscapeDataString(requestState)));
102 | System.Diagnostics.Debug.WriteLine("GetUriFromTaskUri: replacement uri:" + uri);
103 |
104 | System.Threading.Tasks.TaskCompletionSource tcs = new System.Threading.Tasks.TaskCompletionSource();
105 | tcs.SetResult(uri);
106 | return uri;
107 | }
108 | }
109 |
110 | public class OAuth1AuthenticatorImpl : IOAuth1Authenticator
111 | {
112 | public bool AllowCancel;
113 | public event EventHandler Completed;
114 | public event EventHandler Error;
115 | private static readonly System.Threading.Tasks.TaskScheduler UIScheduler = System.Threading.Tasks.TaskScheduler.FromCurrentSynchronizationContext();
116 |
117 | public void OAuth1Authenticator(string consumerKey, string consumerSecret, Uri requestTokenUrl, Uri authorizeUrl, Uri accessTokenUrl, Uri callbackUrl, GetUsernameAsyncFunc getUsernameAsync)
118 | {
119 | Xamarin.Auth.OAuth1Authenticator auth1 = new Xamarin.Auth.OAuth1Authenticator(consumerKey, consumerSecret, requestTokenUrl, authorizeUrl, accessTokenUrl, callbackUrl, null); // TODO: getUsernameAsync argument not implemented
120 | auth1.AllowCancel = AllowCancel;
121 | auth1.Completed += (sender, eventArgs) =>
122 | {
123 | Completed(auth1, new AuthenticatorCompletedEventArgs(new Account(eventArgs.Account, eventArgs.Account.Properties, eventArgs.Account.Username)));
124 | };
125 | auth1.Error += (sender, eventArgs) =>
126 | {
127 | Error(sender, new AuthenticatorErrorEventArgs(eventArgs.Message, eventArgs.Exception));
128 | };
129 | #if __ANDROID__
130 | Android.Content.Intent intent = auth1.GetUI(Auth.context);
131 | Auth.context.StartActivity(intent);
132 | #elif __IOS__
133 | UIKit.UIViewController vc = auth1.GetUI();
134 | Auth.dialog.PresentViewController(vc, true, null);
135 | #elif SILVERLIGHT
136 | Uri uri = auth1.GetUI();
137 | NavigationService.Navigate(uri);
138 | #endif
139 | }
140 |
141 | public IOAuth1Request OAuth1Request(string method, Uri url, Dictionary parameters, Account account, bool includeMultipartInSignature = false)
142 | {
143 | Xamarin.Auth.OAuth1Request xrequest = new Xamarin.Auth.OAuth1Request(method, url, parameters, (Xamarin.Auth.Account)account.xAccount, includeMultipartInSignature);
144 | return new OAuth1RequestImpl(xrequest);
145 | }
146 | }
147 |
148 | public class OAuth1RequestImpl : IOAuth1Request
149 | {
150 | public Xamarin.Auth.OAuth1Request xrequest;
151 | public OAuth1RequestImpl(Xamarin.Auth.OAuth1Request xrequest)
152 | {
153 | this.xrequest = xrequest;
154 | }
155 |
156 | public System.Threading.Tasks.Task GetResponseAsync()
157 | {
158 | System.Threading.Tasks.TaskCompletionSource tcs = new System.Threading.Tasks.TaskCompletionSource();
159 | tcs.SetResult(new ResponseImpl(xrequest.GetResponseAsync()));
160 | return tcs.Task;
161 | }
162 |
163 | public System.Threading.Tasks.Task GetResponseAsync(System.Threading.CancellationToken cancellationToken)
164 | {
165 | System.Threading.Tasks.TaskCompletionSource tcs = new System.Threading.Tasks.TaskCompletionSource();
166 | tcs.SetResult(new ResponseImpl(xrequest.GetResponseAsync(cancellationToken)));
167 | return tcs.Task;
168 | }
169 | }
170 |
171 | public class OAuth2AuthenticatorImpl : IOAuth2Authenticator
172 | {
173 | public bool AllowCancel;
174 | public event EventHandler Completed;
175 | public event EventHandler Error;
176 | private static readonly System.Threading.Tasks.TaskScheduler UIScheduler = System.Threading.Tasks.TaskScheduler.FromCurrentSynchronizationContext();
177 |
178 | public void OAuth2Authenticator(string clientId, string scope, Uri authorizeUrl, Uri redirectUrl)
179 | {
180 | Xamarin.Auth.OAuth2Authenticator auth2 = new BaseOAuth2Authenticator(clientId, scope, authorizeUrl, redirectUrl);
181 | auth2.AllowCancel = AllowCancel;
182 | auth2.Completed += (sender, eventArgs) =>
183 | {
184 | Completed(auth2, new AuthenticatorCompletedEventArgs(new Account(eventArgs.Account, eventArgs.Account.Properties, eventArgs.Account.Username)));
185 | };
186 | auth2.Error += (sender, eventArgs) =>
187 | {
188 | Error(sender, new AuthenticatorErrorEventArgs(eventArgs.Message, eventArgs.Exception));
189 | };
190 | #if __ANDROID__
191 | Android.Content.Intent intent = auth2.GetUI(Auth.context);
192 | Auth.context.StartActivity(intent);
193 | #elif __IOS__
194 | UIKit.UIViewController vc = auth2.GetUI();
195 | Auth.dialog.PresentViewController(vc, true, null);
196 | #elif SILVERLIGHT
197 | Uri uri = auth2.GetUI();
198 | NavigationService.Navigate(uri);
199 | #endif
200 | }
201 |
202 | public void OAuth2Authenticator(string clientId, string scope, Uri authorizeUrl, Uri redirectUrl, string replacementFormatUrl)
203 | {
204 | Xamarin.Auth.OAuth2Authenticator auth2 = new BaseOAuth2Authenticator(clientId, scope, authorizeUrl, redirectUrl, replacementFormatUrl);
205 | auth2.AllowCancel = AllowCancel;
206 | auth2.Completed += (sender, eventArgs) =>
207 | {
208 | Completed(auth2, new AuthenticatorCompletedEventArgs(new Account(eventArgs.Account, eventArgs.Account.Properties, eventArgs.Account.Username)));
209 | };
210 | auth2.Error += (sender, eventArgs) =>
211 | {
212 | Error(sender, new AuthenticatorErrorEventArgs(eventArgs.Message, eventArgs.Exception));
213 | };
214 | #if __ANDROID__
215 | Android.Content.Intent intent = auth2.GetUI(Auth.context);
216 | Auth.context.StartActivity(intent);
217 | #elif __IOS__
218 | UIKit.UIViewController vc = auth2.GetUI();
219 | Auth.dialog.PresentViewController(vc, true, null);
220 | #elif SILVERLIGHT
221 | Uri uri = auth2.GetUI();
222 | NavigationService.Navigate(uri);
223 | #endif
224 | }
225 |
226 | public void OAuth2Authenticator(string clientId, string clientSecret, string scope, Uri authorizeUrl, Uri redirectUrl, Uri accessTokenUrl, GetUsernameAsyncFunc getUsernameAsync = null)
227 | {
228 | Xamarin.Auth.OAuth2Authenticator auth2 = new BaseOAuth2Authenticator(clientId, clientSecret, scope, authorizeUrl, redirectUrl, accessTokenUrl, null); // TODO: getUsernameAsync argument not implemented
229 | auth2.AllowCancel = AllowCancel;
230 | auth2.Completed += (sender, eventArgs) =>
231 | {
232 | Completed(auth2, new AuthenticatorCompletedEventArgs(new Account(eventArgs.Account, eventArgs.Account.Properties, eventArgs.Account.Username)));
233 | };
234 | #if __ANDROID__
235 | Android.Content.Intent intent = auth2.GetUI(Auth.context);
236 | Auth.context.StartActivity(intent);
237 | #elif __IOS__
238 | UIKit.UIViewController vc = auth2.GetUI();
239 | Auth.dialog.PresentViewController(vc, true, null);
240 | #elif SILVERLIGHT
241 | Uri uri = auth2.GetUI();
242 | NavigationService.Navigate(uri);
243 | #endif
244 | }
245 |
246 | public IOAuth2Request OAuth2Request(string method, Uri url, Dictionary parameters, Account account)
247 | {
248 | Xamarin.Auth.OAuth2Request xrequest = new Xamarin.Auth.OAuth2Request(method, url, parameters, (Xamarin.Auth.Account)account.xAccount);
249 | return new OAuth2RequestImpl(xrequest);
250 | }
251 | }
252 |
253 | public class OAuth2RequestImpl : IOAuth2Request
254 | {
255 | public Xamarin.Auth.OAuth2Request xrequest;
256 |
257 | public OAuth2RequestImpl(Xamarin.Auth.OAuth2Request xrequest)
258 | {
259 | this.xrequest = xrequest;
260 | }
261 |
262 | public System.Threading.Tasks.Task GetResponseAsync()
263 | {
264 | System.Threading.Tasks.TaskCompletionSource tcs = new System.Threading.Tasks.TaskCompletionSource();
265 | tcs.SetResult(new ResponseImpl(xrequest.GetResponseAsync()));
266 | return tcs.Task;
267 | }
268 |
269 | public System.Threading.Tasks.Task GetResponseAsync(System.Threading.CancellationToken cancellationToken)
270 | {
271 | System.Threading.Tasks.TaskCompletionSource tcs = new System.Threading.Tasks.TaskCompletionSource();
272 | tcs.SetResult(new ResponseImpl(xrequest.GetResponseAsync(cancellationToken)));
273 | return tcs.Task;
274 | }
275 |
276 | public string AccessTokenParameterName { get { return xrequest.AccessTokenParameterName; } set { xrequest.AccessTokenParameterName = value; } }
277 | }
278 |
279 | public class ResponseImpl : IResponse
280 | {
281 | public System.Threading.Tasks.Task xresponse;
282 | public ResponseImpl(System.Threading.Tasks.Task xresponse)
283 | {
284 | this.xresponse = xresponse;
285 | }
286 | public IDictionary Headers { get { xresponse.Wait(); return xresponse.Result.Headers; } }
287 | public Uri ResponseUri { get { xresponse.Wait(); return xresponse.Result.ResponseUri; } }
288 | public int StatusCode { get { xresponse.Wait(); return (int)xresponse.Result.StatusCode; } } // should be Net.HttpStatusCode
289 | //public IO.Stream GetResponseStream() { return xresponse.Result.GetResponseStream(); } // not implemented
290 | public string GetResponseText() { xresponse.Wait(); return xresponse.Result.GetResponseText(); }
291 | }
292 |
293 | public class AccountStoreImpl : IAccountStore
294 | {
295 | Xamarin.Auth.AccountStore xAccountStore;
296 | static AccountStoreImpl()
297 | {
298 | AccountStore.xAccountStore = new AccountStoreImpl();
299 | }
300 | public IAccountStore xCreate()
301 | {
302 | #if __ANDROID__
303 | xAccountStore = Xamarin.Auth.AccountStore.Create(Auth.context); // context may be all wrong
304 | #elif __IOS__
305 | xAccountStore = Xamarin.Auth.AccountStore.Create();
306 | #elif SILVERLIGHT
307 | xAccountStore = Xamarin.Auth.AccountStore.Create();
308 | #endif
309 | return this;
310 | }
311 | public void Delete(Account account, string serviceId)
312 | {
313 | xAccountStore.Delete((Xamarin.Auth.Account)account.xAccount, serviceId);
314 | }
315 | public List FindAccountsForService(string serviceId)
316 | {
317 | IEnumerable xaccounts = xAccountStore.FindAccountsForService(serviceId);
318 | List accounts = new List();
319 | foreach (Xamarin.Auth.Account xaccount in xaccounts)
320 | accounts.Add(new Account(xaccount, xaccount.Properties, xaccount.Username));
321 | return accounts;
322 | }
323 | public void Save(Account account, string serviceId)
324 | {
325 | xAccountStore.Save((Xamarin.Auth.Account)account.xAccount, serviceId);
326 | }
327 | }
328 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # XamarinAuthInForms
2 | Xamarin PCL App Using OAuth+Forms. See README inside OAuthForm1 folder.
3 |
--------------------------------------------------------------------------------