File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ class Auth {
7373 scope : Array < SecurityProfile [ 'Roles' ] >
7474 ) : Promise < AccessToken > {
7575 const body = {
76- grant_type : 'client_credentials ' ,
76+ grant_type : 'password ' ,
7777 scope : scope . join ( ' ' ) ,
7878 client_id : clientID ,
7979 username,
@@ -109,7 +109,7 @@ class Auth {
109109 scope : Array < SecurityProfile [ 'Roles' ] >
110110 ) : Promise < AccessToken > {
111111 const body = {
112- grant_type : 'password ' ,
112+ grant_type : 'client_credentials ' ,
113113 scope : scope . join ( ' ' ) ,
114114 client_id : clientID ,
115115 client_secret : clientSecret ,
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ class Auth {
7373 scope : Array < SecurityProfile [ 'Roles' ] >
7474 ) : Promise < AccessToken > {
7575 const body = {
76- grant_type : 'client_credentials ' ,
76+ grant_type : 'password ' ,
7777 scope : scope . join ( ' ' ) ,
7878 client_id : clientID ,
7979 username,
@@ -109,7 +109,7 @@ class Auth {
109109 scope : Array < SecurityProfile [ 'Roles' ] >
110110 ) : Promise < AccessToken > {
111111 const body = {
112- grant_type : 'password ' ,
112+ grant_type : 'client_credentials ' ,
113113 scope : scope . join ( ' ' ) ,
114114 client_id : clientID ,
115115 client_secret : clientSecret ,
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ test('can auth with elevated login', async () => {
4747 testdata . scope as SecurityProfile [ 'Roles' ] [ ]
4848 )
4949 expect ( mockAxios . post ) . toHaveBeenCalledTimes ( 1 )
50- const body = `grant_type=client_credentials &scope=${ urlencode (
50+ const body = `grant_type=password &scope=${ urlencode (
5151 testdata . scope . join ( ' ' )
5252 ) } &client_id=${ testdata . clientID } &username=${ urlencode (
5353 testdata . username
@@ -66,7 +66,7 @@ test('can auth with client credentials', async () => {
6666 testdata . scope as SecurityProfile [ 'Roles' ] [ ]
6767 )
6868 expect ( mockAxios . post ) . toHaveBeenCalledTimes ( 1 )
69- const body = `grant_type=password &scope=${ urlencode (
69+ const body = `grant_type=client_credentials &scope=${ urlencode (
7070 testdata . scope . join ( ' ' )
7171 ) } &client_id=${ testdata . clientID } &client_secret=${ testdata . clientSecret } `
7272 expect ( mockAxios . post ) . toHaveBeenCalledWith ( testdata . authUrl , body , {
You can’t perform that action at this time.
0 commit comments