Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecuritySource ¶
type SecuritySource interface { TalentOAuth(ctx context.Context, operationName string) (string, error) BerlogaJWT(ctx context.Context, operationName string) (string, error) ServiceKey(ctx context.Context, operationName string) (string, error) }
SecuritySource объявляет общее API для реализаций SecuritySource конкретных клиентов.
func BerlogaJWT ¶
func BerlogaJWT(token string) SecuritySource
BerlogaJWT выполняет аутентификацию указанным токеном методом BerlogaJWT.
func Context ¶
func Context() SecuritySource
Context выполняет аутентификацию токеном и методом, взятыми из контекста выполняемого запроса.
func NoSecurity ¶ added in v0.5.1
func NoSecurity() SecuritySource
NoSecurity возвращает SecuritySource который не выполняет ни какой аутентификации. Такой SecuritySource можно использовать при обращении к публичным операциям API.
func ServiceKey ¶
func ServiceKey(key string) SecuritySource
ServiceKey выполняет аутентификацию указанным токеном методом ServiceKey.
Click to show internal directories.
Click to hide internal directories.