mapkit_token 1.0.0 → 1.1.0
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 +4 -4
- data/README.md +3 -1
- data/app/controllers/mapkit_token/mapkit_token_controller.rb +5 -1
- data/lib/mapkit_token/version.rb +1 -1
- data/mapkit_token.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4f9dd2168bd221f8290603df43bb6e360ab9655039617a724524546b8f72b5a1
|
|
4
|
+
data.tar.gz: 0af78d389c923158cbfc6c216041e0346eb1888df97a0bf6439744a5fd767893
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5370979c5bcfc442927f2c43840800fe5e5eb6ebde657e355cf0e70e4147b82d8a1ca4647234d8c3fec04f1b19df97a2576ae1265a321c3b91ff14888443f97a
|
|
7
|
+
data.tar.gz: de69bd03a85927e64e3cbc37d2880e5648562b3f9f2dddf81d48a4ecdf32fd3399b46b689b17cc7a26ecc3224a2c0712b787e462b6fc1626897b15d3038f00cf
|
data/README.md
CHANGED
|
@@ -47,7 +47,9 @@ mapkit:
|
|
|
47
47
|
apple_team_id: XXXXXXXXXX
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
The gem provides legacy support for Rails secrets, so if your app uses Rails 4.1 through 5.1, you can simply store the same information in `/config/secrets.yml` and it will just work.
|
|
51
|
+
|
|
52
|
+
After reloading your application, it will have a new endpoint `/mapkit_token` that returns JWTs that are valid for 30 minutes. The application's hostname is added to the JWT payload to specify that the tokens only can used by the application itself.
|
|
51
53
|
|
|
52
54
|
Use the endpoint for the `authorizationCallback` function that MapKit JS calls whenever it detects that a new token is needed.
|
|
53
55
|
|
|
@@ -2,7 +2,11 @@ module MapkitToken
|
|
|
2
2
|
class MapkitTokenController < ApplicationController
|
|
3
3
|
|
|
4
4
|
def mapkit
|
|
5
|
-
Rails.application.credentials
|
|
5
|
+
if Rails.application.respond_to?(:credentials)
|
|
6
|
+
Rails.application.credentials.mapkit
|
|
7
|
+
else
|
|
8
|
+
Rails.application.secrets.mapkit.symbolize_keys
|
|
9
|
+
end
|
|
6
10
|
end
|
|
7
11
|
|
|
8
12
|
def auth_key
|
data/lib/mapkit_token/version.rb
CHANGED
data/mapkit_token.gemspec
CHANGED
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
spec.require_paths = ["lib"]
|
|
21
21
|
|
|
22
22
|
spec.add_development_dependency "bundler", "~> 1.16"
|
|
23
|
-
spec.add_development_dependency "rake", "~>
|
|
23
|
+
spec.add_development_dependency "rake", "~> 12.3.3"
|
|
24
24
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
25
25
|
|
|
26
26
|
spec.add_dependency "activesupport"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mapkit_token
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Edlund
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-12-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
33
|
+
version: 12.3.3
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
40
|
+
version: 12.3.3
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rspec
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
135
135
|
- !ruby/object:Gem::Version
|
|
136
136
|
version: '0'
|
|
137
137
|
requirements: []
|
|
138
|
-
rubygems_version: 3.
|
|
138
|
+
rubygems_version: 3.1.4
|
|
139
139
|
signing_key:
|
|
140
140
|
specification_version: 4
|
|
141
141
|
summary: MapKit JS token endpoint provider.
|