Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@ build/
**/example/.dart_tool/

# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java

Expand Down
3 changes: 3 additions & 0 deletions .pubignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
bitrise.yml
.github
releasing.md
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 3.0.1, May 30, 2023
* Changed access modifier of a native api in order to hide it from the sdk user.

## 3.0.0, May 3, 2023
You can find the full changelog [here](https://developer.onewelcome.com/flutter/plugin/v2-x) and an overview containing the upgrade instructions [here](https://developer.onewelcome.com/flutter/plugin/v2-0).

Expand Down
4 changes: 0 additions & 4 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
<<<<<<< HEAD
limitations under the License.<Paste>
=======
limitations under the License.
>>>>>>> dev/release_first
159 changes: 159 additions & 0 deletions bitrise.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
---
format_version: '11'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: flutter
workflows:
Android:
description: |
Builds project and runs tests.

Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html).
steps:
- git-clone@7: {}
- flutter-installer@0: {}
- script@1:
title: Script - flutter pub get
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully
set -o pipefail
# debug log
set -x

# write your script here
cd $BITRISE_FLUTTER_PROJECT_LOCATION
flutter pub get
- install-missing-android-tools@3:
inputs:
- gradlew_path: "./example/android/gradlew"
- android-unit-test@1:
inputs:
- module: "$MODULE"
- project_location: "$BITRISE_SOURCE_DIR/example/android"
- script@1:
inputs:
- content: |-
#!/bin/env bash
set -ex

# Deleting any old test results from BITRISE_TEST_RESULT_DIR
rm -rf "$BITRISE_TEST_RESULT_DIR/"*

# Creating the sub-directory for the test run within the BITRISE_TEST_RESULT_DIR:
test_run_dir="$BITRISE_TEST_RESULT_DIR/unit_test_results"
mkdir "$test_run_dir"


# Exporting the JUnit XML test report:
cp $BITRISE_SOURCE_DIR/example/build/$MODULE/test-results/testDebugUnitTest/*.xml $test_run_dir/

# Creating the test-info.json file with the name of the test run defined:
echo '{"test-name":"Unit tests"}' >> "$test_run_dir/test-info.json"
is_always_run: true
- deploy-to-bitrise-io@2: {}
iOS:
description: |
Builds project and runs tests.

Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html).
steps:
- git-clone@7: {}
- flutter-installer@0: {}
- cache-pull@2: {}
- script@1:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -e
# make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully
set -o pipefail
# debug log
set -x

# write your script here
cd $BITRISE_FLUTTER_PROJECT_LOCATION
flutter pub get
flutter precache --ios
title: Script - flutter pub get
- script@1:
inputs:
- content: |
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x

gem install cocoapods-art -v 1.0.1
> /Users/vagrant/.netrc
echo "machine repo.onewelcome.com" > /Users/vagrant/.netrc
echo "login $ARTIFACTORY_USER" >> /Users/vagrant/.netrc
echo "password $ARTIFACTORY_PASSWORD" >> /Users/vagrant/.netrc
chmod 600 /Users/vagrant/.netrc
pod repo-art add onegini https://repo.onewelcome.com/artifactory/api/pods/cocoapods-public
title: Script - setup artifactory credentials
- cocoapods-install@2:
inputs:
- source_root_path: "$BITRISE_SOURCE_DIR/example/ios"
- xcodebuild@0:
inputs:
- xcodebuild_actions: build
- xcodebuild_output_formatter: tee
- cache-push@2: {}
- deploy-to-bitrise-io@2: {}
envs:
- opts:
is_expand: false
SIMULATOR_DEVICE: iPhone 14
- opts:
is_expand: false
SIMULATOR_OS_VERSION: latest
- opts:
is_expand: false
BITRISE_PROJECT_PATH: example/ios/Runner.xcworkspace
- opts:
is_expand: false
BITRISE_SCHEME: Runner
primary:
description: |
Builds project and runs tests.

Next steps:
- Check out [Getting started with Flutter apps](https://devcenter.bitrise.io/en/getting-started/getting-started-with-flutter-apps.html).
steps:
- build-router-start@0:
inputs:
- access_token: "$BITRISE_API_TOKEN"
- workflows: iOS
title: Bitrise Start iOS
- build-router-start@0:
title: Bitrise Start Android
inputs:
- access_token: "$BITRISE_API_TOKEN"
- workflows: Android
- git-clone@7: {}
- flutter-installer@0: {}
- deploy-to-bitrise-io@2: {}
- build-router-wait@0:
inputs:
- access_token: "$BITRISE_API_TOKEN"
meta:
bitrise.io:
stack: osx-xcode-14.2.x-ventura
app:
envs:
- opts:
is_expand: false
BITRISE_FLUTTER_PROJECT_LOCATION: example
- opts:
is_expand: false
MODULE: onegini
trigger_map:
- pull_request_source_branch: "*"
workflow: primary
3 changes: 0 additions & 3 deletions example/android/.gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
package com.onegini.mobile.onegini_example;

import android.os.Build;
import com.onegini.mobile.onegini_example.R;
import com.onegini.mobile.sdk.android.model.OneginiClientConfigModel;

public class OneginiConfigModel implements OneginiClientConfigModel {

/* Config model generated by SDK Configurator version: v5.1.0 */

private final String appIdentifier = "FlutterExampleApp";
private final String appPlatform = "android";
private final String redirectionUri = "oneginiexample://loginsuccess";
private final String appVersion = "1.0.2";
private final String baseURL = "https://mobile-security-proxy.test.onegini.com";
private final String resourceBaseURL = "https://mobile-security-proxy.test.onegini.com/resources/";
private final String keystoreHash = "90cf65bea23977e84dcddfb38b8cecb5469d8ca43aa6b01575864ef2ca6eaa48";
private final int maxPinFailures = 3;
private final String serverPublicKey = "17DDB4086A1D3FA37950CBDDC6F1173A0C5902A3B71DAD261290CEFEE13CC9CA";

public String getAppIdentifier() {
return appIdentifier;
}

public String getAppPlatform() {
return appPlatform;
}

public String getRedirectUri() {
return redirectionUri;
}

public String getAppVersion() {
return appVersion;
}

public String getBaseUrl() {
return baseURL;
}

public String getResourceBaseUrl() {
return resourceBaseURL;
}

public int getCertificatePinningKeyStore() {
return R.raw.keystore;
}

public String getKeyStoreHash() {
return keystoreHash;
}

public String getDeviceName() {
return Build.BRAND + " " + Build.MODEL;
}

public String getServerPublicKey() {
return serverPublicKey;
}

/**
* @Deprecated Since Android SDK 8.0.0 this attribute is not required.
*/
public boolean shouldGetIdToken() {
return false;
}

/**
* Get the max PIN failures. This attribute is just used for visual representation towards the end-user.
*
* @Deprecated Since Android SDK 6.01.00 this attribute is fetched from the Device config.
*
* @return The max PIN failures
*/
public int getMaxPinFailures() {
return maxPinFailures;
}

@Override
public String toString() {
return "ConfigModel{" +
" appIdentifier='" + appIdentifier + "'" +
", appPlatform='" + appPlatform + "'" +
", redirectionUri='" + redirectionUri + "'" +
", appVersion='" + appVersion + "'" +
", baseURL='" + baseURL + "'" +
", maxPinFailures='" + maxPinFailures + "'" +
", resourceBaseURL='" + resourceBaseURL + "'" +
", keyStoreHash='" + getKeyStoreHash() + "'" +
", serverPublicKey='" + serverPublicKey + "'" +
"}";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.onegini.mobile.onegini_example;

@SuppressWarnings({ "unused", "WeakerAccess" })
public final class SecurityController {
public static final boolean rootDetection = false;
public static final boolean debugDetection = false;
public static final boolean debugLogs = true;
}

This file was deleted.

Binary file modified example/android/app/src/main/res/raw/keystore.bks
Binary file not shown.
Loading