authentication-zero 2.12.0 → 2.12.1

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: 65673b94c25fddcc0a7bdd31d9dd4a15062dd863b464e712b248b2d4dc2b280e
4
- data.tar.gz: b3012f74b8981d7f2189bd67c08a098412b48c50b763ec509c45ea19c8e1c4f3
3
+ metadata.gz: 5a4a255a118044ab6bdcf5af654088a4636a027db4d5652401087275cc14609e
4
+ data.tar.gz: 935d89fb3cd66416f7bcc9932dfa8d097fd2d103e6577ed59f728bb6568d99fd
5
5
  SHA512:
6
- metadata.gz: dd34f0996158fad54a8514e7ff897db876898e99a00e5ad04181be8747e4886dc27be9b0e2b4b1f965427df05b3ab899920dcf8ffb310c4cb16701d91f28781d
7
- data.tar.gz: c2ada3dffc843ad15589db3ba23be0dc80c87a110b53d6d24965957d3a736fc8258074da308ffb2bf08de0d59f4b772a4edb639f8bad107be4f98513006ecf22
6
+ metadata.gz: 1479fde381e5a5f5f1cbd58aa8847dcf83d9ba32a6d474b239a44df5e25fea18bd758bb022112813b00890c573e55ad50ffc8f586c84531fc58b98a143a5c3c2
7
+ data.tar.gz: e6452d39abad6ace236c4ab6e418b6f5fe313fc4413adf558a49893d70ef63fbb5416e601fe01d26477b379654bc135e30f2f978fce6aa7f8cb2979bf3d7e388
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authentication-zero (2.12.0)
4
+ authentication-zero (2.12.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -21,7 +21,6 @@ curl -H "Authorization: Bearer $ACCESS_TOKEN" \
21
21
  - [Get your sessions](#get-your-sessions)
22
22
  - [Get a session](#get-a-session)
23
23
  - [Destroy a session](#destroy-a-session)
24
- - [Execute sudo](#execute-sudo)
25
24
  - [Update your password](#update-your-password)
26
25
  - [Update your email](#update-your-email)
27
26
  - [Send verification email](#send-verification-email)
@@ -115,21 +114,6 @@ This endpoint will return `201 Created` with the current JSON representation of
115
114
 
116
115
  Returns `204 No Content` if successful.
117
116
 
118
-
119
- ### Execute sudo
120
-
121
- * `POST /sessions/sudo` will grant temporary access to sensitive information.
122
-
123
- ###### Example JSON Request
124
-
125
- ``` json
126
- {
127
- "password": "Secret1*2*3*4*5*6",
128
- }
129
- ```
130
-
131
- Returns `204 No Content` if successful.
132
-
133
117
  ## Password
134
118
 
135
119
  ### Update your password
@@ -158,6 +142,7 @@ This endpoint will return 200 OK with the current JSON representation of the use
158
142
 
159
143
  ``` json
160
144
  {
145
+ "current_password": "Secret1*2*3*4*5*6",
161
146
  "email": "new_email@hey.com"
162
147
  }
163
148
  ```
@@ -1,3 +1,3 @@
1
1
  module AuthenticationZero
2
- VERSION = "2.12.0"
2
+ VERSION = "2.12.1"
3
3
  end
@@ -5,7 +5,10 @@ class RegistrationsController < ApplicationController
5
5
  @user = User.new(user_params)
6
6
 
7
7
  if @user.save
8
- render json: @user, status: :created
8
+ session = @user.sessions.create!
9
+ response.set_header "X-Session-Token", session.signed_id
10
+
11
+ render json: session, status: :created
9
12
  else
10
13
  render json: @user.errors, status: :unprocessable_entity
11
14
  end
@@ -16,7 +16,7 @@ class SessionsController < ApplicationController
16
16
 
17
17
  if user && user.authenticate(params[:password])
18
18
  @session = user.sessions.create!
19
- response.set_header("X-Session-Token", @session.signed_id)
19
+ response.set_header "X-Session-Token", @session.signed_id
20
20
 
21
21
  render json: @session, status: :created
22
22
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authentication-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.0
4
+ version: 2.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-28 00:00:00.000000000 Z
11
+ date: 2022-04-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: