This commit is contained in:
thosakwe 2017-03-07 16:54:13 -05:00
parent 49ec3f4e03
commit 8bb94fdc08
5 changed files with 5 additions and 6 deletions

View file

@ -1,6 +1,6 @@
# angel_client
[![pub 1.0.1](https://img.shields.io/badge/pub-1.0.1-brightgreen.svg)](https://pub.dartlang.org/packages/angel_client)
[![pub 1.0.2](https://img.shields.io/badge/pub-1.0.2-brightgreen.svg)](https://pub.dartlang.org/packages/angel_client)
[![build status](https://travis-ci.org/angel-dart/client.svg)](https://travis-ci.org/angel-dart/client)
Client library for the Angel framework.

View file

@ -1,2 +1 @@
const String GOOGLE = 'google';
const String LOCAL = 'local';

View file

@ -8,7 +8,6 @@ import 'package:http/src/request.dart' as http;
import 'package:http/src/response.dart' as http;
import 'package:http/src/streamed_response.dart' as http;
import 'angel_client.dart';
import 'auth_types.dart' as auth_types;
final RegExp straySlashes = new RegExp(r"(^/)|(/+$)");
const Map<String, String> _readHeaders = const {'Accept': 'application/json'};
@ -56,7 +55,7 @@ abstract class BaseAngelClient extends Angel {
@override
Future<AngelAuthResult> authenticate(
{String type: auth_types.LOCAL,
{String type,
credentials,
String authEndpoint: '/auth',
String reviveEndpoint: '/auth/token'}) async {

View file

@ -16,7 +16,7 @@ class Rest extends BaseAngelClient {
@override
Future<AngelAuthResult> authenticate(
{String type: auth_types.LOCAL,
{String type,
credentials,
String authEndpoint: '/auth',
String reviveEndpoint: '/auth/token'}) async {
@ -28,6 +28,7 @@ class Rest extends BaseAngelClient {
try {
final result = await super.authenticate(
type: null,
credentials: {'token': JSON.decode(window.localStorage['token'])},
reviveEndpoint: reviveEndpoint);
window.localStorage['token'] = JSON.encode(authToken = result.token);

View file

@ -1,5 +1,5 @@
name: angel_client
version: 1.0.1
version: 1.0.2
description: Client library for the Angel framework.
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_client