forked from aerogear-attic/aerogear-cordova-oauth2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.xml
More file actions
147 lines (131 loc) · 6 KB
/
plugin.xml
File metadata and controls
147 lines (131 loc) · 6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
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
142
143
144
145
146
147
<?xml version="1.0" encoding="utf-8" ?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" id="org.jboss.aerogear.cordova.oauth2" version="1.0.1">
<name>OAuth2</name>
<engines>
<engine name="cordova" version=">=3.4.0" />
</engines>
<asset src="www/oauth2.js" target="js/oauth2.js" />
<js-module src="www/oauth2.js" name="oauth2">
<clobbers target="oauth2" />
</js-module>
<dependency id="com.vladstirbu.cordova.promise" url="https://github.com/vstirbu/PromisesPlugin.git"/>
<platform name="android">
<dependency id="org.jboss.aerogear.cordova.android.reflect" url="https://github.com/edewit/aerogear-reflect-cordova.git"/>
<info>
open platforms/android/build.gradle and under the `android` section add:
repositories {
mavenCentral()
}
dependencies {
compile 'org.jboss.aerogear:aerogear-android-authz:2.0.0-alpha.1@aar'
compile 'org.jboss.aerogear:aerogear-android-core:2.0.0-alpha.1@aar'
compile 'org.jboss.aerogear:aerogear-android-pipe:2.0.0-alpha.1@aar'
compile 'org.jboss.aerogear:aerogear-android-store:2.0.0-alpha.1@aar'
compile 'com.google.code.gson:gson:1.7.2'
compile 'com.google.guava:guava:18.0'
}
and add minSdkVersion and targetSdkVersion to defaultConfig, like this:
defaultConfig {
versionCode Integer.parseInt("" + getVersionCodeFromManifest() + "0")
minSdkVersion 16
targetSdkVersion 21
}
you can not use `cordova build` but have to execute `gradle installDebug` from the platforms/android directory
</info>
<config-file target="res/xml/config.xml" parent="/*">
<feature name="OAuth2Plugin">
<param name="android-package" value="org.jboss.aerogear.cordova.oauth2.OAuth2Plugin"/>
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<service android:name="org.jboss.aerogear.android.impl.authz.oauth2.OAuth2AuthzService"/>
</config-file>
<source-file src="src/android/OAuth2Plugin.java" target-dir="src/org/jboss/aerogear/cordova/oauth2/"/>
</platform>
<platform name="ios">
<info>
open xcode go into settings change:
1. `deployment target` to 7.0 or above
2. add `[Project Name]/Plugins/org.jboss.aerogear.cordova.oauth2/Bridging-Header.h` to Objective-c Bridging Header
under the Swift Compiler - Code Generation options
3. set LD_RUNPATH_SEARCH_PATHS to "$(inherited) @executable_path/Frameworks"
</info>
<config-file target="config.xml" parent="/*">
<feature name="OAuth2Plugin">
<param name="ios-package" value="OAuth2Plugin" />
</feature>
</config-file>
<config-file target="*-Info.plist" parent="CFBundleURLTypes">
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>$PACKAGE_NAME</string>
</array>
</dict>
<dict>
<key>CFBundleURLName</key>
<string>fbYYY</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb$PACKAGE_NAME</string>
</array>
</dict>
</array>
</config-file>
<source-file src="src/ios/http-0.2.0/AuthzModule.swift" />
<source-file src="src/ios/http-0.2.0/Http.swift" />
<source-file src="src/ios/http-0.2.0/HttpRequestSerializer.swift" />
<source-file src="src/ios/http-0.2.0/JsonRequestSerializer.swift" />
<source-file src="src/ios/http-0.2.0/JsonResponseSerializer.swift" />
<source-file src="src/ios/http-0.2.0/MultiPartData.swift" />
<source-file src="src/ios/http-0.2.0/RequestSerializer.swift" />
<source-file src="src/ios/http-0.2.0/ResponseSerializer.swift" />
<source-file src="src/ios/http-0.2.0/StringResponseSerializer.swift" />
<source-file src="src/ios/http-0.2.0/Utils.swift" />
<source-file src="src/ios/oauth-0.2.0/AccountManager.swift" />
<source-file src="src/ios/oauth-0.2.0/Config.swift" />
<source-file src="src/ios/oauth-0.2.0/DateUtils.swift" />
<source-file src="src/ios/oauth-0.2.0/FacebookOAuth2Module.swift" />
<source-file src="src/ios/oauth-0.2.0/KeycloakOAuth2Module.swift" />
<source-file src="src/ios/oauth-0.2.0/OAuth2Module.swift" />
<source-file src="src/ios/oauth-0.2.0/OAuth2Session.swift" />
<source-file src="src/ios/oauth-0.2.0/OpenIDClaim.swift" />
<source-file src="src/ios/oauth-0.2.0/TrustedPersistantOAuth2Session.swift" />
<source-file src="src/ios/oauth-0.2.0/UntrustedMemoryOAuth2Session.swift" />
<source-file src="src/ios/Bridging-Header.h" />
<source-file src="src/ios/OAuth2Plugin.swift" />
<source-file src="src/ios/AppDelegate+url.m" />
<source-file src="src/ios/AppDelegate+url.h" />
</platform>
<platform name="wp8">
<info>
open platforms/wp8/App.xaml.cs add the following on line 140:
RootFrame.UriMapper = new OAuthUriMapper();
</info>
<config-file target="config.xml" parent="/*">
<feature name="OAuth2Plugin">
<param name="wp-package" value="OAuth2Plugin"/>
</feature>
</config-file>
<config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App" after="Tokens">
<Extensions>
<Protocol Name="your.protocol" NavUriFragment="encodedLaunchUri=%s" TaskID="_default"/>
</Extensions>
</config-file>
<source-file src="src/wp8/OAuth2Plugin.cs"/>
<source-file src="src/wp8/OAuthUriMapper.cs"/>
<source-file src="src/wp8/P.xaml"/>
<source-file src="src/wp8/P.xaml.cs"/>
<source-file src="src/wp8/AccountManager.cs"/>
<source-file src="src/wp8/AuthzModule.cs"/>
<source-file src="src/wp8/AuthzWebRequest.cs"/>
<source-file src="src/wp8/Config.cs"/>
<source-file src="src/wp8/FacebookOAuth2Module.cs"/>
<source-file src="src/wp8/KeycloakOAuth2Module.cs"/>
<source-file src="src/wp8/ManifestInfo.cs"/>
<source-file src="src/wp8/OAuth2Module.cs"/>
<source-file src="src/wp8/OAuth2Session.cs"/>
<source-file src="src/wp8/TrustedSessionRepository.cs"/>
</platform>
</plugin>