Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Commit f78a245

Browse files
authored
Merge pull request #107 from onewelcome/release_3.0.0
Release 3.0.0
2 parents ddbb5ea + 709f9ae commit f78a245

File tree

233 files changed

+11718
-9228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+11718
-9228
lines changed

.github/workflows/workflow.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Main workflow
2+
on: [push, pull_request]
3+
4+
jobs:
5+
lint_and_format:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v3
9+
- uses: subosito/flutter-action@v2
10+
with:
11+
channel: "stable"
12+
architecture: x64
13+
- run: flutter --version
14+
- name: Install dependencies
15+
run: flutter pub get
16+
- name: Verify formatting
17+
run: dart format --output=none --set-exit-if-changed .
18+
- name: Analyze project source
19+
run: flutter analyze --fatal-infos

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
## 3.0.0, May 3, 2023
2+
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).
3+
4+
[iOS] Wrapper SDK now uses the latest OneWelcome iOS native SDK 12.2.2
5+
6+
* Events are now propagated using Streams and have been renamed to more accurately describe their purpose.
7+
* Removed the following events
8+
- eventOther
9+
- openPinAuthenticator
10+
- eventError
11+
* startApplication now no longer requires a OneginiListener parameter.
12+
* All BuildContext requirements from functions have been removed.
13+
* Resource requests now allow absolute paths.
14+
* Allow for Resource Requests to other resource servers than the one in the tokenserver config file, this is only possible if the server has a correct certificate.
15+
* Updated several parameters and return types of functions.
16+
* Functions are now fully typesafe and nullsafe due to the use of [Pigeon](https://pub.dev/packages/pigeon) internally.
17+
* Updates several functions to no longer return a boolean status but instead resolve/reject.
18+
- setPreferredAuthenticator
19+
- deregisterBiometricAuthenticator
20+
- logout
21+
- authenticateDevice
22+
- validatePinWithPolicy
23+
- authenticateUserImplicitly
24+
- deregisterUser
25+
* submitSuccessAction and submitErrorAction for custom registration no longer require an identity provider id.
26+
* getAppToWebSingleSignOn now returns the actual error code instead of a general error when failing.
27+
* OneginiPinRegistrationCallback.acceptAuthenticationRequest No longer takes a map as a second argument.
28+
* Renamed several resourceRequest functions and added a generic requestResource which takes a type as extra argument.
29+
* Reworked error codes and added constants for all errors(wrapper and native) in lib/errors/error_codes.dart
30+
* Reworked mobileAuthWithOtp.
31+
* Reworked authentication
32+
- Removed getRegisteredAuthenticators
33+
- Removed getAllAuthenticators
34+
- Removed registerAuthenticator
35+
- Added deregisterBiometricAuthenticator
36+
- Added registerBiometricAuthenticator
37+
- Added getBiometricAuthenticator
38+
- Added getPreferredAuthenticator
39+
- Changed setPreferredAuthenticator
40+
- Changed authenticateUser
41+
* Allow sdk <4.0.0
42+
143
## 2.0.1, March 2, 2023
244
Updated the README
345

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ in pubspec.yaml add this:
66

77
dependencies:
88

9-
onegini: 2.0.1
9+
onegini: 3.0.0
1010

1111
`flutter clean`
1212

analysis_options.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
analyzer:
13+
exclude:
14+
- lib/auto_generated_pigeon.dart
15+
16+
linter:
17+
# The lint rules applied to this project can be customized in the
18+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
19+
# included above or to enable additional rules. A list of all available lints
20+
# and their documentation is published at
21+
# https://dart-lang.github.io/linter/lints/index.html.
22+
#
23+
# Instead of disabling a lint rule for the entire project in the
24+
# section below, it can also be suppressed for a single line of code
25+
# or a specific dart file by using the `// ignore: name_of_lint` and
26+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
27+
# producing the lint.
28+
rules:
29+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
30+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
31+
32+
# Additional information about this file can be found at
33+
# https://dart.dev/guides/language/analysis-options
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package com.onegini.mobile.sdk.flutter
22

3+
import com.onegini.mobile.sdk.flutter.module.FacadeModule
34
import com.onegini.mobile.sdk.flutter.module.FlutterOneWelcomeSdkModule
45
import dagger.Component
56
import javax.inject.Singleton
67

7-
@Component(modules = [FlutterOneWelcomeSdkModule::class])
8+
@Component(modules = [FlutterOneWelcomeSdkModule::class, FacadeModule::class])
89
@Singleton
910
interface FlutterOneWelcomeSdkComponent {
10-
1111
fun inject(oneginiPlugin: OneginiPlugin)
1212
}

android/src/main/kotlin/com/onegini/mobile/sdk/flutter/OnMethodCallMapper.kt

Lines changed: 0 additions & 161 deletions
This file was deleted.
Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,36 @@
11
package com.onegini.mobile.sdk.flutter
22

3+
// When editing these errors, make sure to also update the errors in lib/errors/error_codes.dart
34
enum class OneWelcomeWrapperErrors(val code: Int, val message: String) {
4-
GENERIC_ERROR(8000, "Something went wrong"),
5-
USER_PROFILE_DOES_NOT_EXIST(8001, "The requested User profile does not exist"),
6-
NO_USER_PROFILE_IS_AUTHENTICATED(8002, "There is currently no User Profile authenticated"),
7-
AUTHENTICATOR_NOT_FOUND(8004, "The requested authenticator is not found"),
8-
HTTP_REQUEST_ERROR(8011, "OneWelcome: HTTP Request failed internally"),
9-
ERROR_CODE_HTTP_REQUEST(8013, "OneWelcome: HTTP Request returned an error code. Check Response for more info"),
10-
USER_NOT_AUTHENTICATED_IMPLICITLY(8035, "The requested action requires you to be authenticated implicitly"),
11-
METHOD_ARGUMENT_NOT_FOUND(8036, "The passed argument from Flutter could not be found"),
12-
ARGUMENT_NOT_CORRECT(8036, "The passed argument is not correct"),
5+
GENERIC_ERROR(8000, "Something went wrong"),
6+
NOT_AUTHENTICATED_USER(8040, "There is currently no User Profile authenticated"),
7+
NOT_AUTHENTICATED_IMPLICIT(8041, "The requested action requires you to be authenticated implicitly"),
8+
NOT_FOUND_USER_PROFILE(8042, "The requested User profile is not found"),
9+
NOT_FOUND_AUTHENTICATOR(8043, "The requested authenticator is not found"),
10+
NOT_FOUND_IDENTITY_PROVIDER(8044, "The requested identity provider is not found"),
11+
NOT_FOUND_SECURITY_CONTROLLER(8045, "The requested Security controller class is not found"), // Android only
12+
HTTP_REQUEST_ERROR_INTERNAL(8046, "The resource Request failed internally"),
13+
HTTP_REQUEST_ERROR_CODE(8047, "The resource Request returned an HTTP error code. Check Response for more info"),
14+
ONEWELCOME_SDK_NOT_INITIALIZED(8049, "OneWelcomeSDK is not initialized"), // Android only
15+
INVALID_URL(8050, "The provided url is invalid or incorrect"),
16+
NOT_IN_PROGRESS_CUSTOM_REGISTRATION(8051, "Custom Registration is currently not in progress"),
17+
NOT_IN_PROGRESS_AUTHENTICATION(8052, "Authentication is currently not in progress"),
18+
NOT_IN_PROGRESS_OTP_AUTHENTICATION(8053, "OTP Authentication is currently not in progress"),
19+
NOT_IN_PROGRESS_PIN_CREATION(8054, "Pin Creation is currently not in progress"),
20+
NOT_IN_PROGRESS_FINGERPRINT_AUTHENTICATION(8055, "Fingerprint Authentication is currently not in progress"),
21+
ACTION_NOT_ALLOWED_CUSTOM_REGISTRATION_CANCEL(
22+
8057,
23+
"Canceling the Custom registration right now is not allowed." +
24+
" Registration is not in progress or pin creation has already started"
25+
),
26+
ACTION_NOT_ALLOWED_BROWSER_REGISTRATION_CANCEL(
27+
8058,
28+
"Canceling the Browser registration right now is not allowed." +
29+
" Registration is not in progress or pin creation has already started"
30+
),
31+
CONFIG_ERROR(8059, "Something went wrong while setting the configuration"), // Android only
32+
BIOMETRIC_AUTHENTICATION_NOT_AVAILABLE(8060, "Biometric authentication is not supported on this device"),
1333

14-
// Errors that only occur on Android
15-
IDENTITY_PROVIDER_NOT_FOUND(8005, "The requested identity provider is not found"),
16-
QR_CODE_HAS_NO_DATA(8006, "QR-code does not have data"),
17-
METHOD_TO_CALL_NOT_FOUND(8007, "Method to call not found"),
18-
URL_CANT_BE_NULL(8008, "Url can not be null"),
19-
MALFORMED_URL(8009, "Incorrect url format"),
20-
PREFERRED_AUTHENTICATOR_ERROR(8010, "Something went wrong when setting the preferred authenticator"),
21-
ONEWELCOME_SDK_NOT_INITIALIZED(8012, "OneWelcomeSDK is not initialized"),
22-
CONFIG_ERROR(8032, "Something went wrong while setting the configuration"),
23-
SECURITY_CONTROLLER_NOT_FOUND(8033, "Security controller class not found"),
24-
REGISTRATION_NOT_IN_PROGRESS(8034, "No registration in progress for the given Identity Provider"),
34+
// Only used for internal testing
35+
UNEXPECTED_ERROR_TYPE(8999, "An unexpected error type was returned"), // Android only
2536
}

0 commit comments

Comments
 (0)