Git Product home page Git Product logo

solidpod's Introduction

UNDER DEVELOPMENT

This package is currently under development and some API may change. The SolidLogin() and SolidLoginPopup() are used in a number of apps now and are more stable.

Solid Pods

Visit https://soidcommunity.au

Solid is an open standard for a server hosting personal online data stores (Pods). Numerous providers of Solid Server hosting are emerging allowing users to host and migrate their Pods on any such servers (or to run their own server.

This package supports high level access for apps to authenticate users and then to access the user's data from their Pods through Flutter Widgets.

Features

  • Standard widget [SolidLogin] to support authentication against a Solid server:

Default style:

Solid Login

Optional version and visit link:

Solid Login

Changing the image, logo, login text, colour scheme:

KeyPod Login

Change the image, logo, login text, button style, colour scheme:

KeyPod Login

Fine tune to suit the theme of the app:

KeyPod Login

Getting started

TODO: List prerequisites and provide or pointer to information on how to start using the package.

Usage

A simple login screen is provided by the package to take care of the details for authenticating a user against a Solid server. If your own home widget is call MyHome() then simply wrap this within the SolidLogin() widget:

of the

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'My Pod',
      home: const SolidLogin(
        child: Scaffold(body: MyHome()),
      ),
    );
  }

Additional information

TODO: More about the package: where to find more information, how to contribute to the package, how to file issues, what response they can expect from the package authors, and more.

solidpod's People

Contributors

cdawei avatar gjwgit avatar junhaow1 avatar anushkavidanage avatar zheyxu avatar ninadbhat avatar

Stargazers

Bruno Sanguinetti avatar

Watchers

Lucian avatar  avatar Jess Moore avatar  avatar

Forkers

jaxiii

solidpod's Issues

SOLID: Add Makefile support

Description

Add template Makefile and support mk files for flutter.

Why

So that the standard functionality can be supported from the make command: building, testing, packaging, managing, cleaning.

TOKEN: Unable to use the refreshed access token in fetchPrvFile()

Access token can be refreshed through solid-auth, but the fetchPrvFile() function threw an error when using the refreshed access token to get private data in PODs.

The body of the response of the GET request in fetchPrvFile():

{"name":"UnauthorizedHttpError","message":"","statusCode":401,"errorCode":"H401","details":{}}

Solid server reported this error in the log:

[DPoPWebIdExtractor] {Primary} ESC[33mwarnESC[39m: Error verifying WebID via DPoP-bound access token: 
Expected object property cnf, got: [object Object]

Add tooltips to the 4 login buttons

Description

For the 4 login buttons (LOGIN, CONTINUE, GET A POD, INFO) add tooltips with default text that are overridden by an app calling SolidLogin() with loginTooltip, continueTooltip, registerTooltip, and infoTooltip. Default text:

Image

Why

To explain to the user the purpose of each button before they tap the button.

Closing Criteria

  • Tooltips work on desktop
  • Tooltips work on web
  • Tooltips wok on mobile

SOLID: A cancel on authentication to be graciously handled

Description

When on the Authenticate screen in the browser:

Image

I click cancel and the app is blocked with an exception:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0      TokenResponse.idToken (package:solid_auth/src/openid/src/model/token_response.dart:25:66)
#1      Credential.generateLogoutUrl (package:solid_auth/src/openid/src/openid.dart:231:31)
#2      authenticate (package:solid_auth/solid_auth_client.dart:220:35)
<asynchronous suspension>
#3      solidAuthenticate (package:solid/src/solid/authenticate.dart:78:22)
<asynchronous suspension>
#4      _SolidLoginState.build.<anonymous closure> (package:solid/src/solid/login.dart:212:28)
<asynchronous suspension>

It seems the code to capture this is not doing so.

SOLIDPOD: Publish to dev.pub as authenticated user

Description

It is time to publish solidpod to dev.pub. Best to use a Google developer account, authenticated.

Why

  • Ensure we reserve the name solidpod
  • As authenticated user it is trusted more

Closing Criteria

  • The package appears on pub.dev
  • Keypod demonstrated using pub.dev version
  • InnerPod using pub.dev version

SOLIDPOD: Support restoration of token from secure storage an app startup

Description

@junhaow1 is implementing the storage of the solid pod token information in secure storage so as to access it through other app pages.

While a better solution might be through state management, saving to secure storage (assuming "secure" means "secure") opens the opportunity to restore the token from secure storage on app startup and so not require another login every time the app starts up.

This could be an optional feature of SolidLogin() and SolidLoginPopup().

SOLIDPOD: Enhance SolidLoginPopup Widget with Conditional Authentication Flow Logic

Description

Integrate a conditional authentication logic into the SolidLoginPopup widget to streamline the login process. The enhancement involves an automated attempt to retrieve authData from secure storage initially. If this retrieval is successful, the widget will maintain the current state without further action. However, if the retrieval fails, the widget should trigger the popup login window, allowing users to proceed with the standard authentication procedure already in place.

  1. try to retrieve the authData from secure storage
  2. if step 1 is successful, do nothing
  3. otherwise, show the popup login window and do the normal authentication

Why

Implementing this logic enhances the user experience by making the authentication process seamless and efficient. It minimizes unnecessary interactions, ensuring that users who have previously authenticated and have their authData stored can bypass the login popup, thus offering a smoother user journey. This update is crucial for maintaining a user-friendly, secure, and efficient authentication flow, especially in applications where frequent re-authentication can be a hindrance to user engagement.

Closing Criteria

  • The widget successfully retrieves authData from secure storage when available.

  • No further action is taken if authData is successfully retrieved, maintaining the current user session.

  • The login popup window is triggered automatically if authData is not found, allowing the user to authenticate.

  • Ensure the normal authentication process remains intact and is triggered appropriately when needed.

SOLIDPOD: Resolve all public_member_api_docs lint warnings

Analyzing lib...                                                        

   info • Missing documentation for a public member • lib/src/screens/home.dart:51:16 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/screens/home.dart:52:16 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/screens/home.dart:53:31 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/screens/home.dart:59:7 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/screens/home.dart:60:9 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/screens/home.dart:61:10 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:40:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:41:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:42:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:47:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:48:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:49:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:50:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:51:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:52:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:53:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:54:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:55:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:56:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:57:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:58:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:64:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:65:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:66:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:67:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:68:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/constants.dart:69:14 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/pod_service.dart:23:7 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/pod_service.dart:24:16 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/pod_service.dart:25:16 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/pod_service.dart:26:16 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/pod_service.dart:29:7 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/pod_service.dart:30:3 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/pod_service.dart:32:18 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/pod_service.dart:40:33 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/popup_login.dart:26:7 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/popup_login.dart:27:9 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/popup_login.dart:32:19 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/solid/popup_login.dart:33:16 • public_member_api_docs
   info • Missing documentation for a public member • lib/src/widgets/build_message_container.dart:37:29 • public_member_api_docs

43 issues found. (ran in 0.9s)
make: [support/flutter.mk:178: analyze] Error 1 (ignored)

INITIALISE POD: Swap Logout from Pod and SUBMIT buttons

Description

I think the Logout from Pod button is too prominent and yet the Submit button almost gets lost.

The Submit button would be good to go where the Logout from Pod button is currently.

And then let's discuss the use case for the Logout from Pod button being here? If it makes sense then place it at the bottom of the scrolled window after the lsit of resources. It is then there when required but not prominent.

Image

Why are there hard coded references to keypod in solidpod?

Description

Not sure why these appear in solidpod?

02 Apr 21:16:57 gjw@kadesh ~keypod/solidpod$ rgrep keypod lib
lib/src/solid/api/rest_api.dart:  final keyFileUrl = webId!.replaceAll(profCard, 'keypod/$encDir/$encKeyFile');
lib/src/screens/initial_setup/initial_setup_screen_body.dart:                          image: AssetImage('assets/images/keypod_image.jpg'),
lib/src/screens/initial_setup/initial_setup_screen_body.dart:                          logo: AssetImage('assets/images/keypod_logo.png'),
lib/src/screens/initial_setup/initial_setup_screen_body.dart:                          link: 'https://github.com/anusii/keypod',

SOLID LOGIN: On my Android device the Login is stuck at Logging in...

Description

On both keypod and innerpod on clicking the Login button the process is stuck at Logging in...

Image

Seems to be related to:

W/WindowOnBackDispatcher( 1611): OnBackInvokedCallback is not enabled for the application.
W/WindowOnBackDispatcher( 1611): Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
I/flutter ( 1611): server started 4400
I/UrlLauncher( 1611): component name for https://pods.solidcommunity.au/.oidc/auth?response_type=code&scope=openid+openid+profile+offline_access&client_id=lMAfacOQy-NBhn5rZUI39&redirect_uri=http%3A%2F%2Flocalhost%3A4400%2F&response_mode=query&state=TUlZepEpEVCOYmzYR7Q8&code_challenge_method=S256&code_challenge=3Zh7eg6GN1BcAfzPlyl66cYTadwyFkOiutK35JP0u-8 is null
I/UrlLauncher( 1611): component name for https://flutter.dev is null
E/flutter ( 1611): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Could not launch https://pods.solidcommunity.au/.oidc/auth?response_type=code&scope=openid+openid+profile+offline_access&client_id=lMAfacOQy-NBhn5rZUI39&redirect_uri=http%3A%2F%2Flocalhost%3A4400%2F&response_mode=query&state=TUlZepEpEVCOYmzYR7Q8&code_challenge_method=S256&code_challenge=3Zh7eg6GN1BcAfzPlyl66cYTadwyFkOiutK35JP0u-8
E/flutter ( 1611): #0      authenticate.urlLauncher (package:solid_auth/solid_auth_client.dart:175:9)
E/flutter ( 1611): <asynchronous suspension>
E/flutter ( 1611): 

SOLID LOGIN: Button minimum height should be 48px

Description

The Google Play Store checker raises a warning if button heights are less than 48px for appropriate finger taps.

Please increase the button heights on the login screen appropriately.

SOLID LOGIN: Add parameters to the class

Description

This is a sub task of #11.

Implement the parameters for the SolidLogin.

Closing Criteria

Test each for the keypod app.

  • image (new keypod photo)
  • logo (new keypod logo)
  • title ('LOGIN TO ACCESS YOUR KEYPOD')
  • URI (stay with the default https://pods.solidcommunity.au)
  • GET POD button (change colour)
  • LOGIN button (change colour)
  • Link (link to the github page)
  • Version (version is app version)

SOLID LOGIN: Obtain the correct path to the solid server registration

Description

The current SolidLogin() has a fixed path to the registration page, as $webID/.account/login/password/register/. In the solid_auth package it uses getIssuer() to determine the correct path, which has changed over different versions of the Solid server.

This task is to migrate the same functionality to the new solid package.

SOLIDPOD: Resolve all UNUSED CODE issues

Dart Code Metrics: UNUSED CODE
dart run dart_code_metrics:metrics check-unused-code --disable-sunset-warning lib
✔ Analysis is completed. Preparing the results: 1.9s

lib/src/screens/initial_setup/gen_file_body.dart:
    ⚠ unused function genProfFileBody
      at /home/gjw/git/github/anusii/solidpod/lib/src/screens/initial_setup/gen_file_body.dart:160:1

lib/src/screens/initial_setup/initial_setup_screen.dart:
    ⚠ unused top level variable normalLoadingScreenHeight
      at /home/gjw/git/github/anusii/solidpod/lib/src/screens/initial_setup/initial_setup_screen.dart:37:1

lib/src/screens/initial_setup/widgets/initial_setup_welcome.dart:
    ⚠ unused function buildInfoRow
      at /home/gjw/git/github/anusii/solidpod/lib/src/screens/initial_setup/widgets/initial_setup_welcome.dart:97:1
    ⚠ unused function buildLabelRow
      at /home/gjw/git/github/anusii/solidpod/lib/src/screens/initial_setup/widgets/initial_setup_welcome.dart:121:1

lib/src/solid/api/rest_api.dart:
    ⚠ unused function updateIndKeyFile
      at /home/gjw/git/github/anusii/solidpod/lib/src/solid/api/rest_api.dart:396:1
    ⚠ unused function initialProfileUpdate
      at /home/gjw/git/github/anusii/solidpod/lib/src/solid/api/rest_api.dart:512:1

lib/src/solid/constants.dart:
    ⚠ unused top level variable createdDateTimePred
      at /home/gjw/git/github/anusii/solidpod/lib/src/solid/constants.dart:54:1
    ⚠ unused top level variable modifiedDateTimePred
      at /home/gjw/git/github/anusii/solidpod/lib/src/solid/constants.dart:55:1
    ⚠ unused top level variable noteTitlePred
      at /home/gjw/git/github/anusii/solidpod/lib/src/solid/constants.dart:56:1
    ⚠ unused top level variable encNoteContentPred
      at /home/gjw/git/github/anusii/solidpod/lib/src/solid/constants.dart:57:1
    ⚠ unused top level variable noteFileNamePrefix
      at /home/gjw/git/github/anusii/solidpod/lib/src/solid/constants.dart:58:1

lib/src/widgets/loading_screen.dart:
    ⚠ unused function loadingScreen
      at /home/gjw/git/github/anusii/solidpod/lib/src/widgets/loading_screen.dart:38:1

✖ total unused code (classes, functions, variables, extensions, enums, mixins and type aliases) - 12
make: [support/flutter.mk:160: unused_code] Error 1 (ignored)

SOLIDPOD: Implement SolidLoginPopup() for bstim

Description

Not all apps will need to immediately log into the POD on startup. An example is BSTIM which only needs PODs when a survey is to be submitted. This use case is for a solid pod login popup that will establish a connection to the pod.

If a WebID is not known then prompt for it and save it locally, then connect to the server to retrieve the token.

The token should be retained so that no further login is required for reading/writing data during the app session.

If the app folder does not exist for the user on the solid server then run the InitialisePod() widget from #2

Closing Criteria

  • This popup is deployed into bstim
  • This popup is deployed into keypod on the LOAD button

SOLIDPOD: Implement InitialisePod()

Description

If the app's folder on the user's POD does not exist then this Widget will request approval to create it, listing the resources to be created and asking for approval. If encryption is True (as a parameter) then all of the encryption infrastructure is also created.

This is in podnotes/initial_setup/desktop.dart for example and we can reuse a lot of that code, but be sure to document it.

Do not ask for the user's profile (name and gender) which should be in their profile already if they wanted it to be.

This is a sub task of #1

SOLID LOGIN: Extra parameters to support

Description

Probably a good idea to collect additional tuning parameters for SolidLogin and implement as time permits.

  • continueFG: The choice for foreground colour of the continue button
  • loginBG and loginFG
  • registerBG and registerFG
  • infoBG and infoFG

SOLID: Initial solidpod package steps

Description

Our current login screen is common across the gurriny apps and podnotes.

This task will add SolidLogin() to the SOLID package to implement this generic widget.

Milestones

Treat each milestone here as a new issue and branch and create a PR for each as we proceed. Each PR should be reviewed by two others before agreeing to merge the PR. Feel free to split into separate issues if that works better for you (I ran out of time).

Milestones:

  • 1: Solid connection from keypod
  • 2: Dummy SolidLogin #7 - done @gjwgit.
  • 3: Basic Widget with Authentication #11
  • 4: POD Initialisation. See #2 Add the initialise functionality when the folder named as the folder: parameter is not present on the user's POD. Initialise the folder with a simple two entry key-value pair file containing: <user,license,123456>, <user,health,54321>, as well as the master key and other required files, but not password or personal information. For now, the file is not encrypted.
  • Replace the MyHomePage() widget with a simple text view widget to display the current contents of the key-value pairs file.
  • Replace the simple text view widget with a widget to edit/add the key-value pairs to the saved file.
  • Add encryption option as a parameter to the SolidLogin(encrypted: True) when true will prompt for the password in the initialise files.
  • Add reading/writing the files encrypted.

It will utilise code from podnotes/login/screen.dart, abstract it out to solid/login.dart as a Widget SolidLogin, with the required parameters that might eventually include:

  • mainImage: The photo (often) used as the main display on the login screen with a default being indipod/assets/images/anu_aerial_view_square.jpg
  • topLogo: the image file to display in the login window
  • button colours: default colours as in PODNOTES but can be changed as in INDI app
  • showVersion: a Boolean to show the version umber as in the INDI app
  • showSolidProject: a Boolean to include a Visit solidproject link as in the INDI app
  • defaultWebID: default is https://pods.solidcommunity.au as in PODNOTES but overriden as in INDI app
  • title: "LOGIN WITH YOUR POD" by default but can be changed as in INDI app.
  • mainScreen: the widget to pass on to after authenticated

Image

Image

SOLIDPOD: Implement optional non encrypt on SolidLogin

Depends

Description

Encryption is on by default for the data stored in our app pod, but is optional either globally or per read/write.

Closing Criteria

  • SolidLogin() has a new paramater encrypted: True as the default
  • SolidLoginPopup() has a new paramater encrypted: True as the default
  • If encrypted: False in the Logins then do not ask for a password and not not allow readPod/writePod to set encrypted: True
  • readPod() and writePod() will decrypt/encrypt under the bonnet if encryption is enabled.
  • readPod() and writePod() take an optional argument to override global default encrypted: False for example.
  • enableEncryption() can be used later to prompt for Password and enable read/write of encryption

SOLIDPOD: Resolve all UNUSED FILES issues

Dart Code Metrics: UNUSED FILES
dart run dart_code_metrics:metrics check-unused-files --disable-sunset-warning lib
✔ Analysis is completed. Preparing the results: 1.9s

⚠ unused file: /home/gjw/git/github/anusii/solidpod/lib/src/widgets/loading_screen.dart

✖ total unused files - 1
make: [support/flutter.mk:166: unused_files] Error 1 (ignored)

SOLIDPOD: Resolve all use_build_context_synchronously lint warnings

Rework all these to remove the build context issues in the code

   info • Don't use 'BuildContext's across async gaps • lib/src/screens/initial_setup/initial_setup_screen_body.dart:228:23 •
          use_build_context_synchronously
   info • Don't use 'BuildContext's across async gaps • lib/src/screens/initial_setup/widgets/res_create_form_submission.dart:257:11 •
          use_build_context_synchronously
   info • Don't use 'BuildContext's across async gaps • lib/src/solid/pod_service.dart:54:7 • use_build_context_synchronously

and

lib/src/solid/authenticate.dart:68:    // ignore: use_build_context_synchronously
lib/src/screens/initial_setup/widgets/res_create_form_submission.dart:149:          // ignore: use_build_context_synchronously
lib/src/screens/initial_setup/widgets/res_create_form_submission.dart:255:        // ignore: use_build_context_synchronously
lib/src/screens/initial_setup/initial_setup_screen_body.dart:226:                    // ignore: use_build_context_synchronously

SOLID POD and ABOUT: BuildContext issues and Child Instantiation Issues

Description

As demonstrated in the DeadlyBushTucker app the showAbout Dialog using SolidLogin wrapper has issues..

The code is at https://github.com/gjwgit/deadly-bush-tucker. The main branch shows the missing build context if I choose CONTINUE on the login screen. If I login on the login screen then the about works - the build context is not lost.

The original error I was seeing:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: This BuildContext is no longer valid.
The showDialog function context parameter is a BuildContext that is no longer valid.
This can commonly occur when the showDialog function is called after awaiting a Future. In this situation the BuildContext might refer to a widget that has already been disposed during the await. Consider using a parent context instead.
#0      _debugIsActive (package:flutter/src/material/dialog.dart:1491:5)
#1      showDialog (package:flutter/src/material/dialog.dart:1412:10)
#2      showAboutDialog (package:flutter/src/material/about.dart:190:3)
#3      InnerPod.build.<anonymous closure> (package:innerpod/main.dart:97:17)
<asynchronous suspension>

INITIALIZE POD: Alert layout improvements

Description

The Alert box in the InitialisePods() could be better laid out and support a scrolling widget.

In the below screenshot, there is a lot of empty space on the left inside the Alert box that does not need to be there.

On my Linux desktop and Android version I can't seem to scroll the Alert box to see the full message.

Image

SOLID LOGIN: Allow a `skip login` option

Description

Add an option to allow the login to be skipped with something like SolidLogin(requireLogin: false).

If requireLogin is false then there is a CONTINUE button on the app's login screen to go directly to the child.

If the user clicks LOGIN and then CANCEL in the browser popup or enters the wrong credentials, then return to the Login screen.

Why

So that an app that may not require data to be retrieved from or saved to a Pod, but supports it if logged in, can operate without the need of a Pod or logging in. The btsim and innerpod apps are examples of this use case.

SOLID LOGIN: Redesign buttons

Description

The current innerpod looks great with 3 buttons and a visit link. This task updates to 4 buttons, all the same size, and with only 3 buttons if loginRequired is true.

Image

  • I propose we turn all 4 into buttons: LOGIN, CONTINUE, GET A POD, INFO.
  • When CONTINUE is not shown move GET A POD from bottom left to the top right in place of CONTINUE
  • All buttons should be the same size irrespective of the number of buttons
  • The Visit link becomes a help or further info button, default label is INFO
  • The text for each button can be overriden in the SolidLogin() call

WRITEPOD: Implement writePod() to push Solid Pod datafile from app

Depends

Description

A Solid Pod app will want to write (encrypted) datafiles (ttl) to the data folder on the Pod. We also want to hide any complexity from the app developer.

This task is to implement writePod() in solidpod and demonstrate it's use in keypod.

  • Check style guidelines - is this writePod() or WritePod().

writePod() needs the following parameters:

TODO

  • Get master password from local secure storage, otherwise ask user to provide the master password
  • Verify master password using the verification key stored in PODs
  • Use a popup window for user to provide the master password if verification failed
  • Encrypt data and format encrypted data in TTL format (if data file already exists, reuse its individual key and IV)
  • Save encrypted data to PODs (delete the file first if it already exists)
  • Update ind-key.ttl with the individual key and IV for the encrypted data (if applicable)
  • Add an editable table for user to input key/value pairs in keypod and write data in TTL format (e.g. using rdflib)

Why

So that a Solid Pod based app developer can very simply push data to the pod.

Closing Criteria

  • KeyPod demonstrates the use of writePod() by saving a sample text to a file in the pod, then retrieving it to then display and confirm.

SOLID LOGIN MILESTONE 3: Authenticate only for now

Description

A sub-task of #1

Implement the login GUI in solid:solid_login.dart. It should include:

  • image (default is the photo used in the INDI app)

  • logo (default is the logo used in the IND app)

  • title (default is 'LOGIN WITH YOUR POD')

  • URI (default is https://pods.solidcommunity.au)

  • GET POD button (default colour is as in podnotes)

  • LOGIN button (default colour is as in podnotes)

  • Link (default is https://solidporoject.org)

  • Version (obtained from pubspec.yaml)

  • For each of these that have a default there should be a class parameter to change them for the particular app. #16

Authentication is undertaken against the solid server listed in the URI.

When authenticated successfully, display the supplied widget.

Do not check for the existence of the app data folder yet. That will be milestone 4.

If authorization fails after NN seconds return to the login page with a message that the authentication timed out or was cancelled. Discuss with Anushka for some way to return if the authentication is cancelled? Currently the app seems to wait forever. This might be worth a separate issue.

INITIALISE POD: Request Password Key first

Description

In the current InitialisePod page the Password is asked for right at the bottom of the page. Most the the list of resources is probably not very interesting to the user. But the Password is critical.

Perhaps ask for the password first and then the check box then the SUBMIT/RESET buttons then the list of resources that will be created.

READPOD: Implement readPod() to supply Solid Pod datafile to app

Description

A Solid Pod app will want to read (encrypted) datafiles (ttl) from the data folder on the Pod.

This task is to implement readPod() in solidpod and demonstrate it's use in keypod.

  • Check style guidelines - is this readPod() or ReadPod().

readPod() needs the following parameters:

  • TODO

Why

So that a Solid Pod based app developer can very simply retrieve data from the pod. What they do with that data is up to the app.

Closing Criteria

  • KeyPod demonstrates the use of readPod() by retrieveing ../encrypt_key_file.ttl and then a simple text view of this data.

SOLIDPOD: Allow Continue button background colour to be specified

Description

Allow the Continue button background colour as a parameter. Other buttons may get same treatment some day. But setting it light green, for example, allows the developer to highlight the button as the priority button to tap, as it is in the InnerPod app, for example.

APPS: Explore how to use refresh token

Description

Currently, when the login token expires we direct user to the login page again for the login. Instead, we have a refresh token that we might be able to use to keep the user logged in.

Why

Improves user friendliness

Closing Criteria

  • Use refresh token to keep the user logged in

SOLID: Create dummy SolidLogin()

Description

Implement a dummy SolidLogin() that takes 1 parameter, a Widget, and returns that widget to be rendered. Then in main.dart of keypod wrap the current app with SolidLogin().

This task is simply to implement a trivial solid_login.dart in the solid package, export it from the package, and use it in keypod as an import from the solid package.

Why

So that we can get our basic infrastructure tested and working.

Closing Criteria

  • keypod imports SolidLogin from solid

SOLID LOGIN: Overflow on Android for `Logging in...`

Description

Image

The following assertion was thrown during layout:
A RenderFlex overflowed by 4.0 pixels on the bottom.

The relevant error-causing widget was:
  Column
  Column:file:///home/gjw/git/github/anusii/keypod/solid/lib/src/widgets/show_animation_dialog.dart:80:20

To inspect this widget in Flutter DevTools, visit:
http://127.0.0.1:9100/#/inspector?uri=http%3A%2F%2F127.0.0.1%3A32929%2FfraDjtb3hzE%3D%2F&inspectorRef=inspector-0

The overflowing RenderFlex has an orientation of Axis.vertical.
The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and
black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the
RenderFlex to fit within the available space instead of being sized to their natural size.
This is considered an error condition because it indicates that there is content that cannot be
seen. If the content is legitimately bigger than the available space, consider clipping it with a
ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex,
like a ListView.
The specific RenderFlex in question is: RenderFlex#ae515 OVERFLOWING:
  needs compositing
  creator: Column ← SizedBox ← Center ← Padding ← Builder ← _CaptureAll ← MediaQuery ← Padding ←
    SafeArea ← MediaQuery ← Padding ← DisplayFeatureSubScreen ← ⋯
  parentData: <none> (can use size)
  constraints: BoxConstraints(w=150.0, h=250.0)
  size: Size(150.0, 250.0)
  direction: vertical
  mainAxisAlignment: start
  mainAxisSize: max
  crossAxisAlignment: center
  verticalDirection: down
◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
════════════════════════════════════════════════════════════════════════════════════════════════════

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.