keycloak

package
v1.10.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IService

type IService interface {
	LoginOtp(username, password, otp string) (*gocloak.JWT, error)
	IsActiveToken(token string) (bool, error)
	GetAccountIDByJWTToken(token string) (uuid.UUID, error)
	GetUserInfo(accessToken string) (*gocloak.UserInfo, error)
}

func NewKeycloakService

func NewKeycloakService() IService

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) GetAccountIDByJWTToken

func (m *Mock) GetAccountIDByJWTToken(token string) (uuid.UUID, error)

func (*Mock) GetUserInfo

func (m *Mock) GetUserInfo(accessToken string) (*gocloak.UserInfo, error)

func (*Mock) IsActiveToken

func (m *Mock) IsActiveToken(token string) (bool, error)

func (*Mock) LoginOtp

func (m *Mock) LoginOtp(username, password, otp string) (*gocloak.JWT, error)

type Service

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

func (*Service) GetAccountIDByJWTToken

func (s *Service) GetAccountIDByJWTToken(token string) (uuid.UUID, error)

func (*Service) GetUserInfo

func (s *Service) GetUserInfo(accessToken string) (*gocloak.UserInfo, error)

func (*Service) IsActiveToken

func (s *Service) IsActiveToken(token string) (bool, error)

func (*Service) LoginOtp

func (s *Service) LoginOtp(username, password, otp string) (*gocloak.JWT, error)

Jump to

Keyboard shortcuts

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