Skip to content

Commit

Permalink
Merge pull request #107 from onewelcome/release_3.0.0
Browse files Browse the repository at this point in the history
Release 3.0.0
  • Loading branch information
MichielVrins authored May 4, 2023
2 parents ddbb5ea + 709f9ae commit f78a245
Show file tree
Hide file tree
Showing 233 changed files with 11,718 additions and 9,228 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Main workflow
on: [push, pull_request]

jobs:
lint_and_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: "stable"
architecture: x64
- run: flutter --version
- name: Install dependencies
run: flutter pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze project source
run: flutter analyze --fatal-infos
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
## 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).

[iOS] Wrapper SDK now uses the latest OneWelcome iOS native SDK 12.2.2

* Events are now propagated using Streams and have been renamed to more accurately describe their purpose.
* Removed the following events
- eventOther
- openPinAuthenticator
- eventError
* startApplication now no longer requires a OneginiListener parameter.
* All BuildContext requirements from functions have been removed.
* Resource requests now allow absolute paths.
* 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.
* Updated several parameters and return types of functions.
* Functions are now fully typesafe and nullsafe due to the use of [Pigeon](https://pub.dev/packages/pigeon) internally.
* Updates several functions to no longer return a boolean status but instead resolve/reject.
- setPreferredAuthenticator
- deregisterBiometricAuthenticator
- logout
- authenticateDevice
- validatePinWithPolicy
- authenticateUserImplicitly
- deregisterUser
* submitSuccessAction and submitErrorAction for custom registration no longer require an identity provider id.
* getAppToWebSingleSignOn now returns the actual error code instead of a general error when failing.
* OneginiPinRegistrationCallback.acceptAuthenticationRequest No longer takes a map as a second argument.
* Renamed several resourceRequest functions and added a generic requestResource which takes a type as extra argument.
* Reworked error codes and added constants for all errors(wrapper and native) in lib/errors/error_codes.dart
* Reworked mobileAuthWithOtp.
* Reworked authentication
- Removed getRegisteredAuthenticators
- Removed getAllAuthenticators
- Removed registerAuthenticator
- Added deregisterBiometricAuthenticator
- Added registerBiometricAuthenticator
- Added getBiometricAuthenticator
- Added getPreferredAuthenticator
- Changed setPreferredAuthenticator
- Changed authenticateUser
* Allow sdk <4.0.0

## 2.0.1, March 2, 2023
Updated the README

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ in pubspec.yaml add this:

dependencies:

onegini: 2.0.1
onegini: 3.0.0

`flutter clean`

Expand Down
33 changes: 33 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

analyzer:
exclude:
- lib/auto_generated_pigeon.dart

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.onegini.mobile.sdk.flutter

import com.onegini.mobile.sdk.flutter.module.FacadeModule
import com.onegini.mobile.sdk.flutter.module.FlutterOneWelcomeSdkModule
import dagger.Component
import javax.inject.Singleton

@Component(modules = [FlutterOneWelcomeSdkModule::class])
@Component(modules = [FlutterOneWelcomeSdkModule::class, FacadeModule::class])
@Singleton
interface FlutterOneWelcomeSdkComponent {

fun inject(oneginiPlugin: OneginiPlugin)
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
package com.onegini.mobile.sdk.flutter

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

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

0 comments on commit f78a245

Please sign in to comment.