auth0_current_user 0.1.0.4 → 0.1.0.5

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: c68f7321c197398a01de6ed4cccf77c26e7947efdd808863c33a6c76456e2abb
4
- data.tar.gz: 31de0e2c0e4a7324876035305b53f80107b53206b08c335049bc2b3f7978912a
3
+ metadata.gz: f3976912c1050c725f7a44db0f79a09f12d6f901ac54f36750ba4365c36e6a32
4
+ data.tar.gz: b75106e90c7821d950eb8377397ba435a6476f29718bfff16ed154e0f5a896f0
5
5
  SHA512:
6
- metadata.gz: 7ba0f3aac70d35ffbe2f45f58fe893ace7ea1e242669d6e5be1b1279c4484154b89c780b068d0fcf50c5ba079f1bc6d81cedfb7f6dc962528057ff86df5543bf
7
- data.tar.gz: d77ddc5649d3e17ea9d8afa9061a35294e23da56cdb873e7de89194a6980e96249fba4bee2b34ee5be01218fce6707835aa67123ed9b3fea3550cd47b9529a22
6
+ metadata.gz: 03fd71995e1171097cfbd31b6c28d55dcaebeff04acbeafc0897ebcfc76192fd88431c8f929096f1a8083f4197c9c122a0f192ee6fde971c0e048c5421989035
7
+ data.tar.gz: 255a900f591f6ae70d41de1bd3640d69ab23e9abe6d16cb416995133d7db8372a59ac3b4fe81e9886ba03d1af643716d9df15bff983ba7ee982e78b724e3a585
data/.gitignore CHANGED
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .idea
@@ -5,7 +5,6 @@ PATH
5
5
  activesupport
6
6
  jwt
7
7
  request_store
8
- uri
9
8
 
10
9
  GEM
11
10
  remote: https://rubygems.org/
@@ -28,7 +27,6 @@ GEM
28
27
  thread_safe (0.3.6)
29
28
  tzinfo (1.2.7)
30
29
  thread_safe (~> 0.1)
31
- uri (0.10.0)
32
30
  zeitwerk (2.4.0)
33
31
 
34
32
  PLATFORMS
data/README.md CHANGED
@@ -1,8 +1,5 @@
1
1
  # Auth0CurrentUser
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/auth0_current_user`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
2
+ [![Gem Version](https://badge.fury.io/rb/auth0_current_user.svg)](https://badge.fury.io/rb/auth0_current_user)
6
3
 
7
4
  ## Installation
8
5
 
@@ -22,7 +19,20 @@ Or install it yourself as:
22
19
 
23
20
  ## Usage
24
21
 
25
- TODO: Write usage instructions here
22
+ After including the gem in your Gemfile, run `rails g auth0_current_user:install` to install the initializer. This configuration of the gem is dependant on a couple of attributes:
23
+ * `auth0_domain`
24
+ * This is the domain from setting up your Auth0 application.
25
+ * `auth0_audience`
26
+ * This is the api identifier that you chose when creating your api(M2M) application
27
+ * `authenticated_klass`
28
+ * Defaults to `User`, but if you have a different model name for the class that will be logging in and being authenticate, be sure to change that in the initializeer.
29
+ * accepted values are symbols or strings
30
+ * :user, 'user', :User, 'User'
31
+ * :my_user, 'my_user', :MyUser, 'MyUser'
32
+
33
+ To take advantage of the Auth0 authenticating add `include Auth0CurrentUser::Secured` to your base controller or and controller that you wish to be locked down for authentication.
34
+
35
+ Once the `Secured` module is included in your controller, that will give you access to the `#current_user` method. It will find the `authenticated_klass` by it's email and using [Request Store](https://github.com/steveklabnik/request_store), store the user to be available either globally throught the store or in the controllers and views with the `#current_user` method.
26
36
 
27
37
  ## Development
28
38
 
@@ -28,6 +28,5 @@ Gem::Specification.new do |spec|
28
28
  spec.add_dependency 'activesupport'
29
29
  spec.add_dependency 'jwt'
30
30
  spec.add_dependency 'request_store'
31
- spec.add_dependency 'uri'
32
-
31
+
33
32
  end
@@ -1,3 +1,3 @@
1
1
  module Auth0CurrentUser
2
- VERSION = "0.1.0.4"
2
+ VERSION = "0.1.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auth0_current_user
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.4
4
+ version: 0.1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Heft
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-04 00:00:00.000000000 Z
11
+ date: 2021-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: uri
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
55
  description: Implements Auth0's setup for authentication/authorization along with
70
56
  setting a current_user method.
71
57
  email:
@@ -75,12 +61,6 @@ extensions: []
75
61
  extra_rdoc_files: []
76
62
  files:
77
63
  - ".gitignore"
78
- - ".idea/.gitignore"
79
- - ".idea/.rakeTasks"
80
- - ".idea/auth0_current_user.iml"
81
- - ".idea/misc.xml"
82
- - ".idea/modules.xml"
83
- - ".idea/vcs.xml"
84
64
  - ".tool-versions"
85
65
  - CODE_OF_CONDUCT.md
86
66
  - Gemfile
@@ -1,8 +0,0 @@
1
- # Default ignored files
2
- /shelf/
3
- /workspace.xml
4
- # Datasource local storage ignored files
5
- /dataSources/
6
- /dataSources.local.xml
7
- # Editor-based HTTP Client requests
8
- /httpRequests/
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Settings><!--This file was automatically generated by Ruby plugin.
3
- You are allowed to:
4
- 1. Remove rake task
5
- 2. Add existing rake tasks
6
- To add existing rake tasks automatically delete this file and reload the project.
7
- --><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build auth0_current_user-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install auth0_current_user-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install auth0_current_user-0.1.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.0 and build and push auth0_current_user-0.1.0.gem to 'http://rubygems.com'" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
@@ -1,28 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="RUBY_MODULE" version="4">
3
- <component name="ModuleRunConfigurationManager">
4
- <shared />
5
- </component>
6
- <component name="NewModuleRootManager">
7
- <content url="file://$MODULE_DIR$">
8
- <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
9
- <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
10
- <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
11
- </content>
12
- <orderEntry type="inheritedJdk" />
13
- <orderEntry type="sourceFolder" forTests="false" />
14
- <orderEntry type="library" scope="PROVIDED" name="activesupport (v6.0.3.3, asdf: 2.7.1) [gem]" level="application" />
15
- <orderEntry type="library" scope="PROVIDED" name="bundler (v2.1.4, asdf: 2.7.1) [gem]" level="application" />
16
- <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.7, asdf: 2.7.1) [gem]" level="application" />
17
- <orderEntry type="library" scope="PROVIDED" name="i18n (v1.8.5, asdf: 2.7.1) [gem]" level="application" />
18
- <orderEntry type="library" scope="PROVIDED" name="jwt (v2.2.2, asdf: 2.7.1) [gem]" level="application" />
19
- <orderEntry type="library" scope="PROVIDED" name="minitest (v5.14.2, asdf: 2.7.1) [gem]" level="application" />
20
- <orderEntry type="library" scope="PROVIDED" name="rack (v2.2.3, asdf: 2.7.1) [gem]" level="application" />
21
- <orderEntry type="library" scope="PROVIDED" name="rake (v12.3.3, asdf: 2.7.1) [gem]" level="application" />
22
- <orderEntry type="library" scope="PROVIDED" name="request_store (v1.5.0, asdf: 2.7.1) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="thread_safe (v0.3.6, asdf: 2.7.1) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="tzinfo (v1.2.7, asdf: 2.7.1) [gem]" level="application" />
25
- <orderEntry type="library" scope="PROVIDED" name="uri (v0.10.0, asdf: 2.7.1) [gem]" level="application" />
26
- <orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.4.0, asdf: 2.7.1) [gem]" level="application" />
27
- </component>
28
- </module>
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectRootManager" version="2" project-jdk-name="asdf: 2.7.1" project-jdk-type="RUBY_SDK" />
4
- </project>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/auth0_current_user.iml" filepath="$PROJECT_DIR$/.idea/auth0_current_user.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>