LCOV - code coverage report
Current view: top level - lib/network - apptive_grid_authentication_options.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 19 19 100.0 %
Date: 2021-11-04 14:59:40 Functions: 0 0 -

          Line data    Source code
       1             : part of apptive_grid_network;
       2             : 
       3             : /// Model for authentication options
       4             : class ApptiveGridAuthenticationOptions {
       5             :   /// Creates Authentication Object
       6             :   /// [autoAuthenticate] determines if the auth process is started automatically. Defaults to false
       7          21 :   const ApptiveGridAuthenticationOptions({
       8             :     this.autoAuthenticate = false,
       9             :     this.redirectScheme,
      10             :     this.apiKey,
      11             :   });
      12             : 
      13             :   /// Determines whether or not the authentication process should be started automatically or not
      14             :   final bool autoAuthenticate;
      15             : 
      16             :   /// If the Authentication is happening in an external Browser add your custom Redirect URI Scheme so the User gets redirected to the App
      17             :   ///
      18             :   /// Remember that you might need to add some native configurations so your app knows how to handle the redirect.
      19             :   /// For more Info check out https://pub.dev/packages/uni_links
      20             :   final String? redirectScheme;
      21             : 
      22             :   /// [ApptiveGridApiKey] for authentication with an Api Key
      23             :   ///
      24             :   /// If this is not null it will be used instead of trying to authenticate using openid auth
      25             :   final ApptiveGridApiKey? apiKey;
      26             : 
      27           2 :   @override
      28             :   String toString() {
      29           8 :     return 'ApptiveGridAuthenticationOptions(autoAuthenticate: $autoAuthenticate, redirectScheme: $redirectScheme, apiKey: $apiKey)';
      30             :   }
      31             : 
      32           3 :   @override
      33             :   bool operator ==(Object other) {
      34           3 :     return other is ApptiveGridAuthenticationOptions &&
      35           9 :         autoAuthenticate == other.autoAuthenticate &&
      36           9 :         redirectScheme == other.redirectScheme &&
      37           9 :         apiKey == other.apiKey;
      38             :   }
      39             : 
      40           1 :   @override
      41           2 :   int get hashCode => toString().hashCode;
      42             : }
      43             : 
      44             : /// Model to Handle Api Key Authentication
      45             : class ApptiveGridApiKey {
      46             :   /// Creates a ApptiveGridApiKey Model
      47             :   ///
      48             :   /// You will get these values if you create a new ApiKey in your Profile in the ApptiveGrid App
      49           2 :   const ApptiveGridApiKey({
      50             :     required this.authKey,
      51             :     required this.password,
      52             :   });
      53             : 
      54             :   /// Auth Key of the ApiKey
      55             :   final String authKey;
      56             : 
      57             :   /// Password of the ApiKey
      58             :   final String password;
      59             : 
      60           1 :   @override
      61             :   String toString() {
      62           3 :     return 'ApptiveGridApiKey(authKey: $authKey, password: $password)';
      63             :   }
      64             : 
      65           1 :   @override
      66             :   bool operator ==(Object other) {
      67           1 :     return other is ApptiveGridApiKey &&
      68           3 :         authKey == other.authKey &&
      69           3 :         password == other.password;
      70             :   }
      71             : 
      72           1 :   @override
      73           2 :   int get hashCode => toString().hashCode;
      74             : }

Generated by: LCOV version 1.15