auth0_current_user 0.1.0.4 → 0.1.0.5
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/.gitignore +1 -0
- data/Gemfile.lock +0 -2
- data/README.md +15 -5
- data/auth0_current_user.gemspec +1 -2
- data/lib/auth0_current_user/version.rb +1 -1
- metadata +2 -22
- data/.idea/.gitignore +0 -8
- data/.idea/.rakeTasks +0 -7
- data/.idea/auth0_current_user.iml +0 -28
- data/.idea/misc.xml +0 -4
- data/.idea/modules.xml +0 -8
- data/.idea/vcs.xml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3976912c1050c725f7a44db0f79a09f12d6f901ac54f36750ba4365c36e6a32
|
4
|
+
data.tar.gz: b75106e90c7821d950eb8377397ba435a6476f29718bfff16ed154e0f5a896f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03fd71995e1171097cfbd31b6c28d55dcaebeff04acbeafc0897ebcfc76192fd88431c8f929096f1a8083f4197c9c122a0f192ee6fde971c0e048c5421989035
|
7
|
+
data.tar.gz: 255a900f591f6ae70d41de1bd3640d69ab23e9abe6d16cb416995133d7db8372a59ac3b4fe81e9886ba03d1af643716d9df15bff983ba7ee982e78b724e3a585
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
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
|
+
[](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
|
-
|
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
|
|
data/auth0_current_user.gemspec
CHANGED
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
|
+
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:
|
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
|
data/.idea/.gitignore
DELETED
data/.idea/.rakeTasks
DELETED
@@ -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>
|
data/.idea/misc.xml
DELETED
data/.idea/modules.xml
DELETED
@@ -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>
|