File tree 8 files changed +3
-44
lines changed
deployments/docker-compose-example
usecases/userAuthentication 8 files changed +3
-44
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,7 @@ const zConfiguration = z.object({
7
7
. object ( {
8
8
"url" : z . string ( ) . nonempty ( ) , //Example: https://auth.code.gouv.fr/auth (with the /auth at the end)
9
9
"realm" : z . string ( ) . nonempty ( ) ,
10
- "clientId" : z . string ( ) . nonempty ( ) ,
11
- "adminPassword" : z . string ( ) . nonempty ( ) ,
12
- "organizationUserProfileAttributeName" : z . string ( ) . nonempty ( )
10
+ "clientId" : z . string ( ) . nonempty ( )
13
11
} )
14
12
. optional ( ) ,
15
13
"termsOfServiceUrl" : zLocalizedString ,
Original file line number Diff line number Diff line change @@ -34,11 +34,7 @@ import type { User } from "./user";
34
34
export function createRouter ( params : {
35
35
dbApi : DbApiV2 ;
36
36
useCases : UseCases ;
37
- keycloakParams :
38
- | ( KeycloakParams & {
39
- organizationUserProfileAttributeName : string ;
40
- } )
41
- | undefined ;
37
+ keycloakParams : KeycloakParams | undefined ;
42
38
jwtClaimByUserKey : Record < keyof User , string > ;
43
39
termsOfServiceUrl : LocalizedString ;
44
40
readmeUrl : LocalizedString ;
@@ -108,17 +104,6 @@ export function createRouter(params: {
108
104
return ( ) => out ;
109
105
} ) ( )
110
106
) ,
111
- "getOrganizationUserProfileAttributeName" : loggedProcedure . query (
112
- ( ( ) => {
113
- const { organizationUserProfileAttributeName } = keycloakParams ?? { } ;
114
- if ( organizationUserProfileAttributeName === undefined ) {
115
- return ( ) => {
116
- throw new TRPCError ( { "code" : "METHOD_NOT_SUPPORTED" } ) ;
117
- } ;
118
- }
119
- return ( ) => organizationUserProfileAttributeName ;
120
- } ) ( )
121
- ) ,
122
107
"getSoftwares" : loggedProcedure . query ( ( ) => dbApi . software . getAll ( ) ) ,
123
108
"getInstances" : loggedProcedure . query ( ( ) => dbApi . instance . getAll ( ) ) ,
124
109
"getExternalSoftwareOptions" : loggedProcedure
Original file line number Diff line number Diff line change @@ -29,8 +29,6 @@ export async function startRpcService(params: {
29
29
url : string ;
30
30
realm : string ;
31
31
clientId : string ;
32
- adminPassword : string ;
33
- organizationUserProfileAttributeName : string ;
34
32
} ;
35
33
termsOfServiceUrl : LocalizedString ;
36
34
readmeUrl : LocalizedString ;
@@ -112,8 +110,7 @@ export async function startRpcService(params: {
112
110
: {
113
111
"url" : keycloakParams . url ,
114
112
"realm" : keycloakParams . realm ,
115
- "clientId" : keycloakParams . clientId ,
116
- "organizationUserProfileAttributeName" : keycloakParams . organizationUserProfileAttributeName
113
+ "clientId" : keycloakParams . clientId
117
114
} ,
118
115
termsOfServiceUrl,
119
116
readmeUrl,
Original file line number Diff line number Diff line change 1
1
SILL_KEYCLOAK_URL = http://localhost:8081/auth
2
2
SILL_KEYCLOAK_REALM = codegouv
3
3
SILL_KEYCLOAK_CLIENT_ID = sill
4
- SILL_KEYCLOAK_ADMIN_PASSWORD = xxx
5
- SILL_KEYCLOAK_ORGANIZATION_USER_PROFILE_ATTRIBUTE_NAME = agencyName
6
4
SILL_README_URL = https://raw.githubusercontent.com/codegouvfr/sill/refs/heads/main/README.md
7
5
SILL_TERMS_OF_SERVICE_URL = https://code.gouv.fr/sill/tos_fr.md
8
6
SILL_JWT_ID = sub
Original file line number Diff line number Diff line change @@ -51,12 +51,6 @@ export function createSillApi(params: {
51
51
"getOidcParams" : memoize ( ( ) => trpcClient . getOidcParams . query ( ) , {
52
52
"promise" : true
53
53
} ) ,
54
- "getOrganizationUserProfileAttributeName" : memoize (
55
- ( ) => trpcClient . getOrganizationUserProfileAttributeName . query ( ) ,
56
- {
57
- "promise" : true
58
- }
59
- ) ,
60
54
"getSoftwares" : memoize ( ( ) => trpcClient . getSoftwares . query ( ) , {
61
55
"promise" : true
62
56
} ) ,
Original file line number Diff line number Diff line change @@ -25,12 +25,6 @@ export const sillApi: SillApi = {
25
25
} ) ,
26
26
{ "promise" : true }
27
27
) ,
28
- "getOrganizationUserProfileAttributeName" : memoize (
29
- async ( ) => {
30
- throw new Error ( "not implemented" ) ;
31
- } ,
32
- { "promise" : true }
33
- ) ,
34
28
"getSoftwares" : memoize ( ( ) => Promise . resolve ( [ ...softwares ] ) , { "promise" : true } ) ,
35
29
"getInstances" : memoize (
36
30
async ( ) => {
Original file line number Diff line number Diff line change @@ -23,12 +23,6 @@ export type SillApi = {
23
23
> ;
24
24
clear : ( ) => void ;
25
25
} ;
26
- getOrganizationUserProfileAttributeName : {
27
- ( params : TrpcRouterInput [ "getOrganizationUserProfileAttributeName" ] ) : Promise <
28
- TrpcRouterOutput [ "getOrganizationUserProfileAttributeName" ]
29
- > ;
30
- clear : ( ) => void ;
31
- } ;
32
26
getSoftwares : {
33
27
( params : TrpcRouterInput [ "getSoftwares" ] ) : Promise <
34
28
TrpcRouterOutput [ "getSoftwares" ]
Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ export const thunks = {
31
31
32
32
const [ , , { oidc } ] = args ;
33
33
34
- console . log ( "asesrting user not logged : " , oidc . isUserLoggedIn ) ;
35
34
assert ( ! oidc . isUserLoggedIn ) ;
36
35
37
36
return oidc . login ( { doesCurrentHrefRequiresAuth } ) ;
You can’t perform that action at this time.
0 commit comments