File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { Permission } from "../views/Permission";
55 * A ReType constant for {@link DialogInput:type}.
66 */
77export const DialogInput = ( {
8+ grant_type : $ ( string ) ,
89 ticket : $ ( string ) ,
910 claim_token : $ ( string ) ,
1011 claim_token_format : $ ( string ) , // TODO: switch to array of claims objects with unknown structure
Original file line number Diff line number Diff line change @@ -21,18 +21,18 @@ export class TokenRequestHandler extends HttpHandler {
2121 this . logger . info ( `Received token request.` ) ;
2222 const params = input . request . body ;
2323
24- // if (params['grant_type'] !== 'urn:ietf:params:oauth:grant-type:uma-ticket') {
25- // throw new BadRequestHttpError(
26- // `Expected 'grant_type' to be set to 'urn:ietf:params:oauth:grant-type:uma-ticket'
27- // `);
28- // }
29-
3024 try {
3125 reType ( params , DialogInput ) ;
3226 } catch ( e ) {
3327 throw new BadRequestHttpError ( `Invalid token request body: ${ e instanceof Error ? e . message : '' } ` ) ;
3428 }
3529
30+ if ( params [ 'grant_type' ] !== 'urn:ietf:params:oauth:grant-type:uma-ticket' ) {
31+ throw new BadRequestHttpError (
32+ `Expected 'grant_type' to be set to 'urn:ietf:params:oauth:grant-type:uma-ticket'
33+ ` ) ;
34+ }
35+
3636 try {
3737 const tokenResponse = await this . negotiator . negotiate ( params ) ;
3838
You can’t perform that action at this time.
0 commit comments