keycloakapi

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

README

keycloakapi

import "github.com/greenbone/opensight-golang-libraries/pkg/keycloakapi"

Index

type Group

Group represents a Keycloak group.

type Group struct {
    ID   string `json:"id"`
    Name string `json:"name"`
}

type KeycloakAPIClient

KeycloakAPIClient provides methods to interact with Keycloak's REST API.

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

func NewKeycloakAPIClient
func NewKeycloakAPIClient(authClient *auth.KeycloakClient) *KeycloakAPIClient

NewKeycloakAPIClient creates a new KeycloakAPIClient.

func (*KeycloakAPIClient) ListGroups
func (kc *KeycloakAPIClient) ListGroups(ctx context.Context) ([]Group, error)

ListGroups retrieves all groups from Keycloak.

func (*KeycloakAPIClient) ListUsers
func (kc *KeycloakAPIClient) ListUsers(ctx context.Context) ([]User, error)

ListUsers retrieves all users from Keycloak.

type User

User represents a Keycloak user.

type User struct {
    ID        string `json:"id"`
    Username  string `json:"username"`
    Email     string `json:"email"`
    FirstName string `json:"firstName"`
    LastName  string `json:"lastName"`
}

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Group represents a Keycloak group.

type KeycloakAPIClient

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

KeycloakAPIClient provides methods to interact with Keycloak's REST API.

func NewKeycloakAPIClient

func NewKeycloakAPIClient(authClient *auth.KeycloakClient) *KeycloakAPIClient

NewKeycloakAPIClient creates a new KeycloakAPIClient.

func (*KeycloakAPIClient) ListGroups

func (kc *KeycloakAPIClient) ListGroups(ctx context.Context) ([]Group, error)

ListGroups retrieves all groups from Keycloak.

func (*KeycloakAPIClient) ListUsers

func (kc *KeycloakAPIClient) ListUsers(ctx context.Context) ([]User, error)

ListUsers retrieves all users from Keycloak.

type User

type User struct {
	ID        string `json:"id"`
	Username  string `json:"username"`
	Email     string `json:"email"`
	FirstName string `json:"firstName"`
	LastName  string `json:"lastName"`
}

User represents a Keycloak user.

Jump to

Keyboard shortcuts

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