vestauth 0.2.1 → 0.2.2
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 +27 -1
- data/lib/vestauth/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 695290e5fb4ac1ce87fd4b86abf1ba20862bf77dbdc0803d72617937958204af
|
|
4
|
+
data.tar.gz: 70284e5aa34a6d45b3d3f7eef525a4be2c305f0f006611679e15a42949b7d79c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9424fb000e3f8ff37afe0f142eaa9eefa2beaa06e464b0bc21bceeb832d7eb0efe36f15cdc2b2368e3e80e83818cb8d38c785154b1c40edad1fae10cb6790eec
|
|
7
|
+
data.tar.gz: 91a584e689fc281fea7b82af2ab17e01b173de4e2e0f3aff8b0bf37f57cebe0cc9a9637f7f4d3b60a8acee3f5f4ccc3d32f6a2d6b6f88a313fb7421a3f94bb6b
|
data/README.md
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
# vestauth-ruby
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
```sh
|
|
4
|
+
curl -sSf https://vestauth.sh | sh
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
bundle install vestauth
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```rb
|
|
12
|
+
# example
|
|
13
|
+
class ApplicationController < ActionController::Base
|
|
14
|
+
before_action :verify_agent!
|
|
15
|
+
helper_method :current_agent
|
|
16
|
+
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
def verify_agent!
|
|
20
|
+
@current_agent ||= Vestauth.provider.verify(http_method: request.method, uri: request.original_url, headers: request.headers)
|
|
21
|
+
rescue => e
|
|
22
|
+
render json: { error: { status: 401, code: 401, message: e.message } }, status: 401
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def current_agent
|
|
26
|
+
@current_agent
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
```
|
|
4
30
|
|
|
5
31
|
## Development
|
|
6
32
|
|
data/lib/vestauth/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vestauth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- motdotla
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
|
-
description: auth for agents–from the creator of `dotenv` and `dotenvx`
|
|
13
|
+
description: web-bot-auth for agents–from the creator of `dotenv` and `dotenvx`
|
|
14
14
|
email:
|
|
15
15
|
executables: []
|
|
16
16
|
extensions: []
|
|
@@ -53,5 +53,5 @@ requirements: []
|
|
|
53
53
|
rubygems_version: 3.5.11
|
|
54
54
|
signing_key:
|
|
55
55
|
specification_version: 4
|
|
56
|
-
summary: auth for agents–from the creator of `dotenv` and `dotenvx`
|
|
56
|
+
summary: web-bot-auth for agents–from the creator of `dotenv` and `dotenvx`
|
|
57
57
|
test_files: []
|