Merge pull request #462 from BlackVoid/fix/client-attributes

Fixes #460: Fixes KcContext to contain attributes for client object
This commit is contained in:
Joseph Garrone 2023-11-30 18:52:26 +01:00 committed by GitHub
commit 2e8cd375fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -82,6 +82,7 @@ export declare namespace KcContext {
clientId: string; clientId: string;
name?: string; name?: string;
description?: string; description?: string;
attributes: Record<string, string>;
}; };
isAppInitiatedAction: boolean; isAppInitiatedAction: boolean;
messagesPerField: { messagesPerField: {

View File

@ -234,7 +234,8 @@ export const kcContextCommonMock: KcContext.Common = {
"showTryAnotherWayLink": false "showTryAnotherWayLink": false
}, },
"client": { "client": {
"clientId": "myApp" "clientId": "myApp",
"attributes": {}
}, },
"scripts": [], "scripts": [],
"isAppInitiatedAction": false "isAppInitiatedAction": false
@ -314,7 +315,8 @@ export const kcContextMocks = [
"actionUri": "#", "actionUri": "#",
"client": { "client": {
"clientId": "myApp", "clientId": "myApp",
"baseUrl": "#" "baseUrl": "#",
"attributes": {}
} }
}), }),
id<KcContext.Error>({ id<KcContext.Error>({
@ -322,7 +324,8 @@ export const kcContextMocks = [
"pageId": "error.ftl", "pageId": "error.ftl",
"client": { "client": {
"clientId": "myApp", "clientId": "myApp",
"baseUrl": "#" "baseUrl": "#",
"attributes": {}
}, },
"message": { "message": {
"type": "error", "type": "error",
@ -496,7 +499,8 @@ export const kcContextMocks = [
}, },
"client": { "client": {
"clientId": "myApp", "clientId": "myApp",
"baseUrl": "#" "baseUrl": "#",
"attributes": {}
}, },
"logoutConfirm": { "code": "123", skipLink: false } "logoutConfirm": { "code": "123", skipLink: false }
}), }),