1.0.2
This commit is contained in:
parent
54899922bd
commit
69826aed59
4 changed files with 6 additions and 7 deletions
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
|
@ -6,7 +6,7 @@
|
|||
"type": "dart-cli",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceRoot}/example",
|
||||
"debugSettings": "${command.debugSettings}",
|
||||
"debugSettings": "${command:debugSettings}",
|
||||
"program": "${workspaceRoot}/example/server.dart",
|
||||
"args": []
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ const Map<String, String> TWITTER_CONFIG = const {
|
|||
'secret': 'n2oA0ZtR7TzYincpMYElRpyYovAQlhYizTkTm2x5QxjH6mLVyE'
|
||||
};
|
||||
|
||||
verifier(Twit twit) async {
|
||||
verifier(TwitBase twit) async {
|
||||
// Maybe fetch user credentials:
|
||||
return await twit.get('/account/verify_credentials.json');
|
||||
}
|
||||
|
|
|
@ -5,13 +5,12 @@ import 'dart:io';
|
|||
import 'package:angel_auth/angel_auth.dart';
|
||||
import 'package:angel_framework/angel_framework.dart';
|
||||
import 'package:crypto/crypto.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:random_string/random_string.dart' as rs;
|
||||
import 'package:twit/twit.dart';
|
||||
import 'package:twit/io.dart';
|
||||
|
||||
const String _ENDPOINT = "https://api.twitter.com";
|
||||
|
||||
typedef TwitterAuthVerifier(Twit twit);
|
||||
typedef TwitterAuthVerifier(TwitBase twit);
|
||||
|
||||
class TwitterStrategy extends AuthStrategy {
|
||||
HttpClient _client = new HttpClient();
|
||||
|
@ -158,7 +157,7 @@ class TwitterStrategy extends AuthStrategy {
|
|||
accessTokenSecret: loginData['oauth_token_secret']
|
||||
);
|
||||
|
||||
var twit = new Twit(credentials, new http.Client());
|
||||
var twit = new Twit(credentials);
|
||||
return await this.verifier(twit);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ environment:
|
|||
sdk: ">=1.19.0"
|
||||
homepage: "https://github.com/angel-dart/auth_twitter.git"
|
||||
name: "angel_auth_twitter"
|
||||
version: "1.0.1"
|
||||
version: "1.0.2"
|
||||
dependencies:
|
||||
angel_auth: "^1.0.0-dev"
|
||||
random_string: "^0.0.1"
|
||||
|
|
Loading…
Reference in a new issue