Skip to content

Commit 9f4b20c

Browse files
committed
Throw error when idp is not set while generating token
1 parent 41b629a commit 9f4b20c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/authentication/TokenCreationCSS.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import crossfetch from 'cross-fetch';
2121

2222
export async function generateCSSToken(options: IClientCredentialsTokenGenerationOptions) {
2323

24+
if (!options.idp) throw new BashlibError(BashlibErrorMessage.noIDPOption)
25+
2426
if (!options.idp.endsWith('/')) options.idp += '/';
2527

2628
// This assumes your server is started under http://localhost:3000/.

0 commit comments

Comments
 (0)