kc

package module
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 24 Imported by: 2

README

Keycloak auth package for stdhttp

Documentation

Overview

Обратные вызовы

Основной функционал

Инициализация

Взаимодействие с KC сервером

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(http *stdhttp.HTTP) (err error)

Добавление в листенер Add --

Types

type AuthHandler

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

Описание

func (*AuthHandler) Check

func (ah *AuthHandler) Check(id uint64, prefix string, path string, w http.ResponseWriter, r *http.Request) (identity *auth.Identity, tryNext bool, err error)

Стандартный вызов - попытка аутентификации данным методом

func (*AuthHandler) Enabled

func (ah *AuthHandler) Enabled() bool

Стандартный вызов - метод разрешен?

func (*AuthHandler) Handler

func (ah *AuthHandler) Handler(id uint64, prefix string, path string, w http.ResponseWriter, r *http.Request) (processed bool)

Обработчк обратных HTTP вызовов

func (*AuthHandler) Init

func (ah *AuthHandler) Init(cfg *config.Listener) (err error)

Инициализация метода

func (*AuthHandler) Score

func (ah *AuthHandler) Score() int

Стандартный вызов - получение индекса для упорядочивания в последовательности вызовов методов

func (*AuthHandler) WWWAuthHeader

func (ah *AuthHandler) WWWAuthHeader() (name string, withRealm bool)

Стандартный вызов - получение имени метода и необходимости добавления realm в HTTP заголовок

Jump to

Keyboard shortcuts

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