Documentation ¶
Index ¶
- Constants
- func CSRFValidationHandler(handler http.Handler, rejector Rejector) http.Handler
- func CheckAdminHandler(handler http.Handler, rejector Rejector) http.Handler
- func CheckAuthenticationHandler(handler http.Handler, rejector Rejector) http.Handler
- func CheckAuthorizationHandler(handler http.Handler, rejector Rejector) http.Handler
- func IsCSRFRequired(r *http.Request) bool
- func NewCheckBuildReadAccessHandlerFactory(buildFactory db.BuildFactory) *checkBuildReadAccessHandlerFactory
- func NewCheckBuildWriteAccessHandlerFactory(buildFactory db.BuildFactory) *checkBuildWriteAccessHandlerFactory
- func NewCheckPipelineAccessHandlerFactory(teamFactory db.TeamFactory) *checkPipelineAccessHandlerFactory
- type CheckBuildReadAccessHandlerFactory
- type CheckBuildWriteAccessHandlerFactory
- type CheckPipelineAccessHandlerFactory
- type CheckWorkerTeamAccessHandlerFactory
- type CookieSetHandler
- type Rejector
- type UnauthorizedRejector
Constants ¶
View Source
const AuthCookieName = "ATC-Authorization"
View Source
const BuildContextKey = "build"
View Source
const CSRFHeaderName = "X-Csrf-Token"
View Source
const CSRFRequiredKey = "CSRFRequired"
View Source
const PipelineContextKey = "pipeline"
View Source
const TokenTypeBearer = "Bearer"
Variables ¶
This section is empty.
Functions ¶
func CSRFValidationHandler ¶
func CheckAdminHandler ¶
func IsCSRFRequired ¶
func NewCheckBuildReadAccessHandlerFactory ¶
func NewCheckBuildReadAccessHandlerFactory( buildFactory db.BuildFactory, ) *checkBuildReadAccessHandlerFactory
func NewCheckBuildWriteAccessHandlerFactory ¶
func NewCheckBuildWriteAccessHandlerFactory( buildFactory db.BuildFactory, ) *checkBuildWriteAccessHandlerFactory
func NewCheckPipelineAccessHandlerFactory ¶
func NewCheckPipelineAccessHandlerFactory( teamFactory db.TeamFactory, ) *checkPipelineAccessHandlerFactory
Types ¶
type CheckWorkerTeamAccessHandlerFactory ¶
type CheckWorkerTeamAccessHandlerFactory interface {
HandlerFor(pipelineScopedHandler http.Handler, rejector Rejector) http.Handler
}
func NewCheckWorkerTeamAccessHandlerFactory ¶
func NewCheckWorkerTeamAccessHandlerFactory( workerFactory db.WorkerFactory, ) CheckWorkerTeamAccessHandlerFactory
type CookieSetHandler ¶
func (CookieSetHandler) ServeHTTP ¶
func (handler CookieSetHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type UnauthorizedRejector ¶
type UnauthorizedRejector struct{}
func (UnauthorizedRejector) Forbidden ¶
func (UnauthorizedRejector) Forbidden(w http.ResponseWriter, r *http.Request)
func (UnauthorizedRejector) Unauthorized ¶
func (UnauthorizedRejector) Unauthorized(w http.ResponseWriter, r *http.Request)
Source Files ¶
- check_admin_handler.go
- check_auth_handler.go
- check_authorization_handler.go
- check_build_read_access_handler.go
- check_build_write_access_handler.go
- check_pipeline_access_handler.go
- check_worker_team_access_handler.go
- context_keys.go
- cookie_set_handler.go
- csrf_validation_handler.go
- unauthorized_rejector.go
Click to show internal directories.
Click to hide internal directories.