firebase_id_token 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7687e01bff51fa178d2b249b3e08a1954aea5c0
4
- data.tar.gz: 920f8d9d78f49bab33e743f38073e94617b0faf7
3
+ metadata.gz: 10e2e87315caff74a53a4899cc088d737e8d7b5a
4
+ data.tar.gz: 823c6b4809fc6c8b998d7a5e76f7ba978464b8c0
5
5
  SHA512:
6
- metadata.gz: 1b92e54cf67b8a9c5dc8cec974541412b34f877a7503734ca97ac78f12806883ce042e37bac2f5e531b1ec4533da73c4a77a0507672a77d4ccf62eaa42393a89
7
- data.tar.gz: 568d7343bcc05d7ba8a6e267f397cffdc7d15146321fa76f4b22c842e34b226c34ee7ea579755e15bb25831a10171bdde0558d3a41b6bb2a792e0135617251a0
6
+ metadata.gz: 301165fd8085b562c37c0e6440655886ca0abe310a9d3a57a46770a7317159db476a396f7d2a4253e5c0854eeb14ee5290291374e8587697f4849467b52712f0
7
+ data.tar.gz: 8c46a36573cee0c8d6463768566aa58995e3b544ecf70c9aa8b0708047b9fa510e6d983b2aa12547329bd153e4e74f5e1a179f05040f934abf7ad1ef153ebbba
data/.yardopts CHANGED
@@ -1 +1,2 @@
1
+ --markup-provider=redcarpet
1
2
  --markup=markdown
data/README.md CHANGED
@@ -34,7 +34,7 @@ gem install firebase_id_token
34
34
 
35
35
  or in your Gemfile
36
36
  ```
37
- gem 'firebase_id_token'
37
+ gem 'firebase_id_token', '~> 1.2.1'
38
38
  ```
39
39
  then
40
40
  ```
@@ -62,7 +62,7 @@ In this case you must have the gem `redis` in your `Gemfile`.
62
62
  ```ruby
63
63
  FirebaseIdToken.configure do |config|
64
64
  config.project_ids = ['your-firebase-project-id']
65
- congig.redis = Redis.new(:host => "10.0.1.1", :port => 6380, :db => 15)
65
+ congig.redis = Redis.new(host: '10.0.1.1', port: 6380, db: 15)
66
66
  end
67
67
  ```
68
68
 
@@ -86,24 +86,30 @@ FirebaseIdToken::Certificates.request_anyway
86
86
 
87
87
  Google give us information about the certificates expiration time, it's used to set a Redis TTL (Time-To-Live) when saving it. By doing so, the certificates will be automatically deleted after it's expiration.
88
88
 
89
- You can access informations about it:
89
+ #### Certificates Info
90
+
91
+ Checks the presence of certificates in Redis database.
90
92
  ```ruby
91
- # Boolean representing the presence of certificates in Redis database.
92
93
  FirebaseIdToken::Certificates.present?
93
94
  => true
95
+ ```
94
96
 
95
- # How many seconds until the certificates expiration.
97
+ How many seconds until the certificates expiration.
98
+ ```ruby
96
99
  FirebaseIdToken::Certificates.ttl
97
100
  => 22352
101
+ ```
98
102
 
99
- # List of all certificates in database.
103
+ Lists all certificates in database.
104
+ ```ruby
100
105
  FirebaseIdToken::Certificates.all
101
- => [{"ec8f292sd30224afac5c55540df66d1f999d" => <OpenSSL::X509::Certificate: [...]
106
+ => [{"ec8f292sd30224afac5c55540df66d1f999d" => <OpenSSL::X509::Certificate: [...]]
107
+ ```
102
108
 
103
- # Returns the respective certificate of a given Key ID.
109
+ Finds the respective certificate of a given Key ID.
110
+ ```ruby
104
111
  FirebaseIdToken::Certificates.find('ec8f292sd30224afac5c55540df66d1f999d')
105
- => <OpenSSL::X509::Certificate: subject=<OpenSSL::X509 [...]
106
-
112
+ => <OpenSSL::X509::Certificate: subject=<OpenSSL::X509 [...]>
107
113
  ```
108
114
 
109
115
  #### Downloading in Rails
@@ -129,7 +135,7 @@ Pass the Firebase ID Token to `FirebaseIdToken::Signature.verify` and it will re
129
135
 
130
136
  ```ruby
131
137
  FirebaseIdToken::Signature.verify(token)
132
- => {"iss"=>"https://securetoken.google.com/firebase-id-token", "name"=>"Bob Test", [...]
138
+ => {"iss"=>"https://securetoken.google.com/firebase-id-token", "name"=>"Bob Test", [...]}
133
139
  ```
134
140
 
135
141
  When either the signature is false or the token is invalid, it will return `nil`:
@@ -145,7 +151,7 @@ FirebaseIdToken::Signature.verify('aaaaaa')
145
151
 
146
152
  #### Payload Structure
147
153
 
148
- In case you need, here's a example of the payload structure in JSON.
154
+ In case you need, here's a example of the payload structure from a Google login in JSON.
149
155
  ```json
150
156
  {
151
157
  "iss":"https://securetoken.google.com/firebase-id-token",
@@ -1,3 +1,3 @@
1
1
  module FirebaseIdToken
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: firebase_id_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Schuindt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-26 00:00:00.000000000 Z
11
+ date: 2017-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler