Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
diaspora
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
diasporg
diaspora
Commits
6fb1e1f5
Unverified
Commit
6fb1e1f5
authored
Nov 10, 2018
by
Benjamin Neff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bump jwt
parent
2210cf00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
Gemfile.lock
Gemfile.lock
+1
-1
spec/controllers/api/openid_connect/authorizations_controller_spec.rb
...lers/api/openid_connect/authorizations_controller_spec.rb
+2
-6
No files found.
Gemfile.lock
View file @
6fb1e1f5
...
...
@@ -350,7 +350,7 @@ GEM
jsonpath (0.9.6)
multi_json
to_regexp (~> 0.2.1)
jwt (
1.5.6
)
jwt (
2.1.0
)
kgio (2.11.2)
kostya-sigar (2.0.4)
leaflet-rails (1.3.1)
...
...
spec/controllers/api/openid_connect/authorizations_controller_spec.rb
View file @
6fb1e1f5
...
...
@@ -31,12 +31,10 @@ describe Api::OpenidConnect::AuthorizationsController, type: :request do
context
"as a request object"
do
it
"should return a form page"
do
header
=
JWT
.
encoded_header
(
"none"
)
payload_hash
=
{
client_id:
client
.
client_id
,
redirect_uri:
"http://localhost:3000/"
,
response_type:
"id_token"
,
scope:
"openid"
,
nonce:
"hello"
,
state:
"hello"
,
claims:
{
userinfo:
{
name:
{
essential:
true
}}}}
payload
=
JWT
.
encoded_payload
(
JSON
.
parse
(
payload_hash
.
to_json
))
request_object
=
header
+
"."
+
payload
+
"."
request_object
=
JWT
.
encode
(
payload_hash
,
nil
,
"none"
)
get
new_api_openid_connect_authorization_path
,
params:
{
client_id:
client
.
client_id
,
redirect_uri:
"http://localhost:3000/"
,
response_type:
"id_token"
,
scope:
"openid"
,
nonce:
"hello"
,
state:
"hello"
,
request:
request_object
}
...
...
@@ -46,11 +44,9 @@ describe Api::OpenidConnect::AuthorizationsController, type: :request do
context
"as a request object with no claims"
do
it
"should return a form page"
do
header
=
JWT
.
encoded_header
(
"none"
)
payload_hash
=
{
client_id:
client
.
client_id
,
redirect_uri:
"http://localhost:3000/"
,
response_type:
"id_token"
,
scope:
"openid"
,
nonce:
"hello"
,
state:
"hello"
}
payload
=
JWT
.
encoded_payload
(
JSON
.
parse
(
payload_hash
.
to_json
))
request_object
=
header
+
"."
+
payload
+
"."
request_object
=
JWT
.
encode
(
payload_hash
,
nil
,
"none"
)
get
new_api_openid_connect_authorization_path
,
params:
{
client_id:
client
.
client_id
,
redirect_uri:
"http://localhost:3000/"
,
response_type:
"id_token"
,
scope:
"openid"
,
nonce:
"hello"
,
state:
"hello"
,
request:
request_object
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment