token

package
v0.0.0-...-aa03a8f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2016 License: Apache-2.0, BSD-3-Clause, CC-BY-3.0, + 3 more Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterAccess

func FilterAccess(username string, authenticated bool, a *token.ResourceActions)

FilterAccess modify the action list in access based on permission determine if the request needs to be authenticated.

func GenTokenForUI

func GenTokenForUI(username string, service string, scopes []string) (token string, expiresIn int, issuedAt *time.Time, err error)

GenTokenForUI is for the UI process to call, so it won't establish a https connection from UI to proxy.

func GetResourceActions

func GetResourceActions(scopes []string) []*token.ResourceActions

GetResourceActions ...

func MakeToken

func MakeToken(username, service string, access []*token.ResourceActions) (token string, expiresIn int, issuedAt *time.Time, err error)

MakeToken makes a valid jwt token based on parms.

Types

type Handler

type Handler struct {
	beego.Controller
}

Handler handles request on /service/token, which is the auth provider for registry.

func (*Handler) Get

func (h *Handler) Get()

Get handles GET request, it checks the http header for user credentials and parse service and scope based on docker registry v2 standard, checkes the permission agains local DB and generates jwt token.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL