handler

package
v0.0.0-...-be43ff6 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2015 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package handler

Defined permissions: * permission("rn:hydra:policies") actions("create") * permission("rn:hydra:policies:%s", id) actions("get", "delete")

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreatePolicyPayload

type CreatePolicyPayload struct {
	Description string              `json:"description"`
	Subjects    []string            `json:"subjects"`
	Effect      string              `json:"effect"`
	Resources   []string            `json:"resources"`
	Permissions []string            `json:"permissions"`
	Conditions  []*DefaultCondition `json:"conditions"`
}

type GrantedPayload

type GrantedPayload struct {
	Resource   string            `json:"resource"`
	Token      string            `json:"token"`
	Permission string            `json:"permission"`
	Context    *operator.Context `json:"context"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(s Storage, m middleware.Middleware, g Guarder, j *jwt.JWT, o osin.Storage) *Handler

func (*Handler) Create

func (h *Handler) Create(ctx context.Context, rw http.ResponseWriter, req *http.Request)

func (*Handler) Delete

func (h *Handler) Delete(ctx context.Context, rw http.ResponseWriter, req *http.Request)

func (*Handler) Get

func (h *Handler) Get(ctx context.Context, rw http.ResponseWriter, req *http.Request)

func (*Handler) Granted

func (h *Handler) Granted(ctx context.Context, rw http.ResponseWriter, req *http.Request)

func (*Handler) SetRoutes

func (h *Handler) SetRoutes(r *mux.Router, extractor func(h hctx.ContextHandler) hctx.ContextHandler)

Jump to

Keyboard shortcuts

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