keycloak

package
v1.7.10 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

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