Documentation ¶
Index ¶
- Constants
- func AppendIDNowActions(authActions []string) []string
- func MakeAuthorizationMobileComponentMW(logger log.Logger) func(Component) Component
- func MakeGetUserInformationEndpoint(component Component) cs.Endpoint
- func MakeMobileHandler(e endpoint.Endpoint, logger log.Logger) *http_transport.Server
- type AuthorizationManager
- type Component
- type Endpoints
- type KeycloakClient
- type TokenProvider
- type UsersDetailsDBModule
Constants ¶
const (
GetUserInformation = "GetUserInformation"
)
Creates constants for API method names
Variables ¶
This section is empty.
Functions ¶
func AppendIDNowActions ¶
AppendIDNowActions is used to let the bridge load IDNow rights for IDNow actions (IDN_Init)
func MakeAuthorizationMobileComponentMW ¶
MakeAuthorizationMobileComponentMW checks authorization and return an error if the action is not allowed.
func MakeGetUserInformationEndpoint ¶
MakeGetUserInformationEndpoint makes the GetUserInformation endpoint
func MakeMobileHandler ¶
MakeMobileHandler make an HTTP handler for a Mobile endpoint.
Types ¶
type AuthorizationManager ¶
type AuthorizationManager interface {
CheckAuthorizationOnTargetUser(ctx context.Context, action, targetRealm, userID string) error
}
AuthorizationManager is the interface to check authorizations of a user
type Component ¶
type Component interface {
GetUserInformation(ctx context.Context) (api.UserInformationRepresentation, error)
}
Component interface exposes methods used by the bridge API
func NewComponent ¶
func NewComponent(keycloakClient KeycloakClient, configDBModule keycloakb.ConfigurationDBModule, usersDBModule UsersDetailsDBModule, tokenProvider TokenProvider, authManager AuthorizationManager, logger keycloakb.Logger) Component
NewComponent returns the self-service component.
type KeycloakClient ¶
type KeycloakClient interface { GetRealm(accessToken string, realmName string) (kc.RealmRepresentation, error) GetUser(accessToken string, realmName, userID string) (kc.UserRepresentation, error) }
KeycloakClient interface exposes methods we need to call to send requests to Keycloak API
type TokenProvider ¶
TokenProvider is the interface to retrieve accessToken to access KC