This repository was archived by the owner on May 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,8 @@ services:
6363 # - 'VERIFY_ACCESS_TOKEN_HASH=false # <- explicitly disable access token hash verification (OPTIONAL),
6464 # default: true
6565 # - 'SKIP_PREJOIN_SCREEN=false' # <- skips the jitsi prejoin screen after login (default: true)
66+ # - 'GROUP=example' # <- Value for the 'group' field in the token
67+ # default: ''
6668 ports :
6769 - ' 3000:3000'
6870
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ pub(crate) struct Cfg {
2929 pub ( crate ) verify_access_token_hash : Option < bool > ,
3030 #[ serde( default ) ]
3131 pub ( crate ) skip_prejoin_screen : Option < bool > ,
32+ #[ serde( default ) ]
33+ pub ( crate ) group : String ,
34+
3235}
3336
3437fn default_listen_addr ( ) -> SocketAddr {
Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ async fn callback(
154154 config. jitsi_sub ,
155155 "*" . to_string ( ) ,
156156 config. jitsi_secret ,
157+ config. group ,
157158 )
158159 . map_err ( |err| {
159160 error ! ( "Unable to create jwt: {}" , err) ;
@@ -316,11 +317,12 @@ fn create_jitsi_jwt(
316317 sub : String ,
317318 room : String ,
318319 secret : String ,
320+ group : String ,
319321) -> anyhow:: Result < String > {
320322 let iat = OffsetDateTime :: now_utc ( ) ;
321323 let exp = iat + Duration :: days ( 1 ) ;
322324
323- let context = JitsiContext { user, group : None } ;
325+ let context = JitsiContext { user, group : Some ( group ) } ;
324326 let claims = JitsiClaims {
325327 context,
326328 aud,
You can’t perform that action at this time.
0 commit comments