Documentation ¶
Index ¶
- Variables
- func CreateToken(publicKey libtrust.PublicKey, privateKey libtrust.PrivateKey, issuer string, ...) (string, error)
- func InitFormatter()
- func IsScopePublic(publicPrefixes []string, scopeItem *token.ResourceActions) bool
- func ParsePrefixes(prefixInput string) []string
- func ParseUsers(userInput string) (map[string]string, error)
- type Formatter
- type Request
- type Response
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ( PublicPrefixes = flag.String("public", "", "prefixes of public readable folders") UserInput = flag.String("users", "", "Yaml formatted list of users") Realm = flag.String("realm", "Registry", "Realm for the registry") Issuer = flag.String("issuer", "Registry", "Issuer for the registry") Service = flag.String("service", "Registry", "Service name for the registry") )
View Source
var (
Debug = flag.Bool("debug", false, "Show debug logging")
)
View Source
var (
ServerPort = flag.Int("port", 8080, "Port for the server to listen on")
)
Functions ¶
func CreateToken ¶
func InitFormatter ¶ added in v1.0.10
func InitFormatter()
func IsScopePublic ¶ added in v1.0.12
func IsScopePublic(publicPrefixes []string, scopeItem *token.ResourceActions) bool
func ParsePrefixes ¶
Types ¶
type Request ¶
type Request struct { User string Password string Service string ApprovedScope []*token.ResourceActions RequestedScope []*token.ResourceActions // contains filtered or unexported fields }
type Server ¶
type Server struct { Users map[string]string PublicPrefixes []string Issuer string CertDir string CertPath string KeyPath string Service string Realm string Port int Debug bool Router *mux.Router // contains filtered or unexported fields }
func (*Server) GetFullAccessToken ¶ added in v1.0.10
func (*Server) HandleAuth ¶
func (s *Server) HandleAuth(writer http.ResponseWriter, request *http.Request)
func (*Server) Initialise ¶
func (*Server) LoadCertAndKey ¶
func (*Server) StartAndWait ¶
Click to show internal directories.
Click to hide internal directories.