omniauth-fishbrain 0.11.2 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth-fishbrain/version.rb +1 -1
- data/lib/omniauth/fishbrain/premium_status.rb +2 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 815a9d4e769ec9b9d05bb7cd0314395df844c3190b148960403207030b4b5cfc
|
4
|
+
data.tar.gz: 29f2f2cde590788567aedfbb85ff569943f77a8068a3d78590a35876e2d762f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 174826683c500756bc406c58e0bca176d9e43ded8eb65eaf4c445981e702dd6de42cf43a8e0a86bc64a29ba8b5d4ca621e9f6ccaf6524904b5acdef8054c3552
|
7
|
+
data.tar.gz: c93625fad9bcc3ce07f51191992cc89cee90eef27b2593003ae807141a285c0ae963a40902bfdf2dbd006325af0c22edd75d63745782155d07432542a2788376
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'date'
|
4
3
|
require 'json'
|
5
4
|
|
6
5
|
module OmniAuth
|
@@ -9,15 +8,14 @@ module OmniAuth
|
|
9
8
|
def premium_status
|
10
9
|
return {} unless id_token['premium_status']
|
11
10
|
|
12
|
-
JSON.parse
|
11
|
+
JSON.parse(id_token['premium_status'])
|
13
12
|
rescue JSON::ParserError
|
14
13
|
{}
|
15
14
|
end
|
16
15
|
|
17
16
|
def premium?
|
18
|
-
|
17
|
+
Time.xmlschema(premium_status['end_date']) > Time.new.utc
|
19
18
|
rescue ArgumentError
|
20
|
-
# if format was wrong
|
21
19
|
false
|
22
20
|
end
|
23
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-fishbrain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Dalen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-05-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jwt
|