flutter_liferay_oauth 0.1.2

  • README.md
  • Example
  • Installing
  • Versions
  • new67

Flutter Liferay OAuth 2.0 #

A Flutter OAuth package for performing Liferay login using OAuth2 standard to access Liferay DXP JAX-RS service. Forked from Earlybyte.aad_oauth.

Supported Flows:

More info on Liferay/Oauth2

Usage #

Create a Liferay JAX-RS service and configure OAUTH 2.0 by following these instructions

In the flutter app, initialize:

final Config config = new Config(
final LiferayOAuth oauth = new LiferayOAuth(config);

This allows you to pass in an Liferay Server, Redirect Url, client ID, Client secret and few more optional params.

If your service require to pass an oauth2 scope, the config allows for an optional param 'scope'. For more on OAuth2 Scopes

Then once you have an OAuth instance, you can call login() and afterwards getAccessToken() to retrieve an access token and pass it to the rest client:

await oauth.login();
String accessToken = await oauth.getAccessToken();

You can also call getAccessToken() directly. It will automatically login and retrieve an access token.

Tokens are cached in-memory. To destroy the tokens you can call logout():

Installation #

Add the following to your pubspec.yaml dependencies:

  flutter_liferay_oauth: "^0.1.2"

[0.0.1] - 20190131

  • Initial release


myblogs Secure #

A secure Flutter application powered Liferay DXP.

Getting Started #

This is an example application secured by Liferay login using OAuth2 standard.

It uses flutter_liferay_oauth flutter package created by Xtivia Developers to simplify the login needs.

OAuth 2.0 is an industry-standard authorization protocol. Users can seamlessly share select credentials from another website/Mobile App to log into yours. It works by authorizing password-less access to portions of user-owned resources (such as an email address, a user profile picture, or something else from your account) and other permissioned resources.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  flutter_liferay_oauth: ^0.1.2

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:flutter_liferay_oauth/flutter_liferay_oauth.dart';
Version Uploaded Documentation Archive
0.1.2 Feb 16, 2019 Go to the documentation of flutter_liferay_oauth 0.1.2 Download flutter_liferay_oauth 0.1.2 archive
0.1.1 Feb 16, 2019 Go to the documentation of flutter_liferay_oauth 0.1.1 Download flutter_liferay_oauth 0.1.1 archive
0.1.0 Feb 16, 2019 Go to the documentation of flutter_liferay_oauth 0.1.0 Download flutter_liferay_oauth 0.1.0 archive
0.0.2 Feb 1, 2019 Go to the documentation of flutter_liferay_oauth 0.0.2 Download flutter_liferay_oauth 0.0.2 archive
0.0.1 Feb 1, 2019 Go to the documentation of flutter_liferay_oauth 0.0.1 Download flutter_liferay_oauth 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13+1
  • Flutter: 1.2.1


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

97 out of 97 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/request/authorization_request.dart.

Run flutter format to format lib/request/authorization_request.dart.

Format lib/request/token_refresh_request.dart.

Run flutter format to format lib/request/token_refresh_request.dart.

Format lib/request/token_request.dart.

Run flutter format to format lib/request/token_request.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
flutter_webview_plugin ^0.3.0+2 0.3.0+2
http ^0.12.0 0.12.0+1
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
http_parser 3.1.3
meta 1.1.6 1.1.7
path 1.6.2
sky_engine 0.0.99
source_span 1.5.4
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies