Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-server
Commits
f6312975
Verified
Commit
f6312975
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: GRPC-web proxy
parent
28cc6ac8
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!58
REL: prepare release 0.7.2
,
!45
F grpc f acm
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/caosdb/server/grpc/AuthInterceptor.java
+6
-1
6 additions, 1 deletion
src/main/java/org/caosdb/server/grpc/AuthInterceptor.java
with
6 additions
and
1 deletion
src/main/java/org/caosdb/server/grpc/AuthInterceptor.java
+
6
−
1
View file @
f6312975
...
@@ -30,6 +30,8 @@ class AuthInterceptor implements ServerInterceptor {
...
@@ -30,6 +30,8 @@ class AuthInterceptor implements ServerInterceptor {
private
static
final
Key
<
String
>
AUTHENTICATION_HEADER
=
private
static
final
Key
<
String
>
AUTHENTICATION_HEADER
=
Key
.
of
(
"authentication"
,
Metadata
.
ASCII_STRING_MARSHALLER
);
Key
.
of
(
"authentication"
,
Metadata
.
ASCII_STRING_MARSHALLER
);
private
static
final
Key
<
String
>
AUTHORIZATION_HEADER
=
Key
.
of
(
"Authorization"
,
Metadata
.
ASCII_STRING_MARSHALLER
);
private
static
final
Context
.
Key
<
Subject
>
SUBJECT_KEY
=
Context
.
key
(
"subject"
);
private
static
final
Context
.
Key
<
Subject
>
SUBJECT_KEY
=
Context
.
key
(
"subject"
);
private
static
final
String
BASIC_SCHEME_PREFIX
=
"Basic "
;
private
static
final
String
BASIC_SCHEME_PREFIX
=
"Basic "
;
/**
/**
...
@@ -67,7 +69,10 @@ class AuthInterceptor implements ServerInterceptor {
...
@@ -67,7 +69,10 @@ class AuthInterceptor implements ServerInterceptor {
final
ServerCall
<
ReqT
,
RespT
>
call
,
final
ServerCall
<
ReqT
,
RespT
>
call
,
final
Metadata
headers
,
final
Metadata
headers
,
final
ServerCallHandler
<
ReqT
,
RespT
>
next
)
{
final
ServerCallHandler
<
ReqT
,
RespT
>
next
)
{
final
String
authentication
=
headers
.
get
(
AUTHENTICATION_HEADER
);
String
authentication
=
headers
.
get
(
AUTHENTICATION_HEADER
);
if
(
authentication
==
null
)
{
authentication
=
headers
.
get
(
AUTHORIZATION_HEADER
);
}
Status
status
=
Status
status
=
Status
.
UNKNOWN
.
withDescription
(
Status
.
UNKNOWN
.
withDescription
(
"An unknown error occured during authentication. Please report a bug."
);
"An unknown error occured during authentication. Please report a bug."
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment