Version: next

KeycloakCrudService

This custom CRUD Service shows another potential way to add auth

This is actually quite nice and clean but it does not allow for field level auth. It's still a possibility that we could go with though!

Type parameters

Type

Hierarchy

  • GraphbackProxyService‹Type›

    KeycloakCrudService

Implements

  • GraphbackCRUDService‹Type›

Index

Constructors

Properties

Methods

Constructors

constructor

+ new KeycloakCrudService(__namedParameters: object): KeycloakCrudService

Overrides void

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:31

Parameters:

__namedParameters: object

NameType
authConfigobject
serviceGraphbackCRUDService‹any, any›

Returns: KeycloakCrudService

Properties

Private authConfig

authConfig: CrudServiceAuthConfig

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:31


Protected proxiedService

proxiedService: GraphbackCRUDService

Inherited from KeycloakCrudService.proxiedService

Defined in packages/graphback-core/types/runtime/GraphbackProxyService.d.ts:11

Methods

batchLoadData

batchLoadData(relationField: string, id: string | number, filter: any, context: GraphbackContext | KeycloakContext | any): any

Overrides void

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:141

Parameters:

NameType
relationFieldstring
idstring | number
filterany
contextGraphbackContext | KeycloakContext | any

Returns: any


Private checkAuthRulesForInput

checkAuthRulesForInput(context: any, inputKeys: string[]): void

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:155

Checks if user is allowed to create/update particular field

Parameters:

NameType
contextany
inputKeysstring[]

Returns: void


Private checkAuthRulesForSelections

checkAuthRulesForSelections(context: any): void

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:171

Checks if user is allowed to request particular field

Parameters:

NameType
contextany

Returns: void


create

create(data: Type, context: GraphbackContext | KeycloakContext | any): Promise‹Type›

Overrides void

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:38

Parameters:

NameType
dataType
contextGraphbackContext | KeycloakContext | any

Returns: Promise‹Type›


delete

delete(data: Type, context: GraphbackContext | KeycloakContext | any): Promise‹Type›

Overrides void

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:63

Parameters:

NameType
dataType
contextGraphbackContext | KeycloakContext | any

Returns: Promise‹Type›


findBy

findBy(filter: QueryFilter‹Type›, context: GraphbackContext | KeycloakContext | any | any, page?: GraphbackPage, orderBy?: GraphbackOrderBy): Promise‹ResultList‹Type››

Overrides void

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:87

Parameters:

NameType
filterQueryFilter‹Type›
contextGraphbackContext | KeycloakContext | any | any
page?GraphbackPage
orderBy?GraphbackOrderBy

Returns: Promise‹ResultList‹Type››


findOne

findOne(args: any, context: GraphbackContext | KeycloakContext | any): Promise‹Type›

Overrides void

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:74

Parameters:

NameType
argsany
contextGraphbackContext | KeycloakContext | any

Returns: Promise‹Type›


subscribeToCreate

subscribeToCreate(filter?: any, context?: any): AsyncIterator‹Type›

Overrides void

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:108

Parameters:

NameType
filter?any
context?any

Returns: AsyncIterator‹Type›


subscribeToDelete

subscribeToDelete(filter?: any, context?: any): AsyncIterator‹Type›

Overrides void

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:130

Parameters:

NameType
filter?any
context?any

Returns: AsyncIterator‹Type›


subscribeToUpdate

subscribeToUpdate(filter?: any, context?: any): AsyncIterator‹Type›

Overrides void

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:119

Parameters:

NameType
filter?any
context?any

Returns: AsyncIterator‹Type›


update

update(data: Type, context: GraphbackContext | KeycloakContext | any): Promise‹Type›

Overrides void

Defined in packages/graphback-keycloak-authz/src/KeycloakCrudService.ts:51

Parameters:

NameType
dataType
contextGraphbackContext | KeycloakContext | any

Returns: Promise‹Type›