github-authentication 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13ed97d12d8f6c281dddeace6aa4f3f9cf89acec84329dfb40af0e9e47c79aa5
4
- data.tar.gz: 7fbc0d346197fa5ec32969f93ba9e021a6c3f259fc25bf5c5d06f47035efd477
3
+ metadata.gz: 10d63c1d1bf541971469409ba5a47e3ff2ca8e34d53300d4f0af5aa3d28aed22
4
+ data.tar.gz: 12facda5d7b25f772a56732419d9f0e934d385a3e85451bd44b7ff8002fb0dff
5
5
  SHA512:
6
- metadata.gz: 796745050e0f7b9712eb28c7498c1e88c4032ffb6d0eb0a6ca6aaa6522190541879e115dfb329ca1beed45e511902b0d2a8761cd1ce83113391070a21171142b
7
- data.tar.gz: 0c8ff23991ac13f648ad51bd108744cd4185a10bad1a13dc1e691d95d0c4d85d866d64bbf8d9f777b1bf92aa5da804600ad0751248825632d66a185a183ebc21
6
+ metadata.gz: 31b569ecaebbbd1107ff9c9d0bad15baea88b230b3958a62f8a8e6c7af7d1d20c405a1d2d5008fcf12cf0e72faf5b861d158bca069181996b8ab23b84067f72d
7
+ data.tar.gz: 45519a0abbaa8b7ce2ff5e6ca42be4a845d078bc5b1b6e4b8b57e4161c38bd41e52d3f0cb5a288b6e0058622dcc9ffc39971100598c70fa5a79b29558c8b8ae1
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- github-authentication (0.1.0)
4
+ github-authentication (0.1.2)
5
5
  jwt (~> 2.2)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -23,7 +23,7 @@ Or install it yourself as:
23
23
  ## Usage
24
24
 
25
25
  ```ruby
26
- require 'github-authentication'
26
+ require 'github/authentication'
27
27
 
28
28
  cache = Github::Authentication::Cache.new(storage: Github::Authentication::ObjectCache.new)
29
29
  generator = Github::Authentication::Generator::App.new(pem: ENV['GITHUB_PEM'],
@@ -32,6 +32,7 @@ generator = Github::Authentication::Generator::App.new(pem: ENV['GITHUB_PEM'],
32
32
  provider = Github::Authentication::Provider.new(generator: generator, cache: cache)
33
33
 
34
34
  provider.token
35
+ provider.reset_token
35
36
  ```
36
37
 
37
38
  ### Cache
@@ -23,7 +23,7 @@ module Github
23
23
 
24
24
  def write(key, value, options = {})
25
25
  if options.key?(:expires_in)
26
- options[:expires_at] = Time.now.utc + options[:expires_in] * 60
26
+ options[:expires_at] = Time.now.utc + options[:expires_in]
27
27
  end
28
28
  @cache[key] = { value: value, options: options }
29
29
  end
@@ -22,7 +22,7 @@ module Github
22
22
  end
23
23
 
24
24
  def expires_in
25
- (@expires_at - Time.now.utc).to_i / 60
25
+ (@expires_at - Time.now.utc).to_i
26
26
  end
27
27
 
28
28
  def expired?(seconds_ttl: 300)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Github
4
4
  module Authentication
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frederik Dudzik
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-12 00:00:00.000000000 Z
11
+ date: 2020-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt