-
Couldn't load subscription status.
- Fork 147
Add Basic Auth option #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Hi @arthursp , |
|
Hi @vaenow, on the server side, just need to add basic auth. I tested with a simple htaccess and htpasswd with an apache server : AuthType Basic
AuthName "Password Protected Area"
AuthUserFile /var/www/apkmanager/.htpasswd
Require valid-userand the htpasswd : test:$apr1$XQ6wTvJB$rgTrtnB06BGyI3JXJlFjE. test:test as user:password |
|
For the ionic native plugin ( in case of ) : export class AppUpdate extends IonicNativePlugin {
/**
* Check and update
* @param updateUrl {string} update api url
* @param options {json} options object
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova({
callbackOrder: 'reverse'
})
checkAppUpdate(updateUrl: string, options?: any): Promise<any> { return; }
} |
|
I want to do like the following but i can't because appUpdate.checkAppUpdate in my code have one parameter.What do i need to do?please someone answer me........ appUpdate.checkAppUpdate(onSuccess, onFail, updateUrl, { |
|
in the ionic native plugin : export class AppUpdate extends IonicNativePlugin {
/**
* Check and update
* @param updateUrl {string} update api url
* @param options {json} options object
* @return {Promise<any>} Returns a promise that resolves when something happens
*/
@Cordova({
callbackOrder: 'reverse'
})
checkAppUpdate(updateUrl: string, options?: any): Promise<any> { return; }
} |
|
Thank you for replying.You mean that you want to change AppUpdate class(index.d.ts) in my code situated node-modules as showing you.But I change the code as you show, I got the error like this 'An Implementation cannot be declared in ambient contexts ". I think that i need to do something .Please show the way. :) :) My original code is the following like that. export declare class AppUpdate extends IonicNativePlugin { |
|
in /node_modules/@ionic-native/app-update/index.d.ts Which version of typescript do you have ? You may use : npm install --save typescript@latest |
|
This hasn't been included in the ionic native plugin yet? |
|
Nope, not yet :S |
|
Hey all, I created a PR to add this feature. Wait for our next release |
Add an option to use basic auth for config.xml and apk URI.
usage :
Also need to update IONIC native wrapper ( work in progress )