Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
keycloak-proxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Janne Mareike Koschinski
keycloak-proxy
Commits
200f1943
Commit
200f1943
authored
7 years ago
by
Rohith
Browse files
Options
Downloads
Patches
Plain Diff
a
parent
17136a42
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/api/doc.go
+5
-40
5 additions, 40 deletions
pkg/api/doc.go
with
5 additions
and
40 deletions
pkg/api/doc.go
+
5
−
40
View file @
200f1943
...
...
@@ -15,7 +15,11 @@ limitations under the License.
package
api
import
"time"
import
(
"fmt"
"strconv"
"time"
)
// Resource represents a url resource to protect
type
Resource
struct
{
...
...
@@ -293,42 +297,3 @@ type storage interface {
// Close is used to close off any resources
Close
()
error
}
// reverseProxy is a wrapper
type
reverseProxy
interface
{
ServeHTTP
(
rw
http
.
ResponseWriter
,
req
*
http
.
Request
)
}
// userContext represents a user
type
userContext
struct
{
// the id of the user
id
string
// the email associated to the user
email
string
// a name of the user
name
string
// the preferred name
preferredName
string
// the expiration of the access token
expiresAt
time
.
Time
// a set of roles associated
roles
[]
string
// the audience for the token
audience
string
// the access token itself
token
jose
.
JWT
// the claims associated to the token
claims
jose
.
Claims
// whether the context is from a session cookie or authorization header
bearerToken
bool
}
// tokenResponse
type
tokenResponse
struct
{
TokenType
string
`json:"token_type"`
AccessToken
string
`json:"access_token"`
IDToken
string
`json:"id_token"`
RefreshToken
string
`json:"refresh_token,omitempty"`
ExpiresIn
int
`json:"expires_in"`
Scope
string
`json:"scope,omitempty"`
}
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