Browse Source
Merge pull request #11569 from dashevchenko/oauth2CLientsFix
Rollback to the old oauth2 clients api
pull/11580/head
Viacheslav Klimov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
2 additions and
2 deletions
-
application/src/main/java/org/thingsboard/server/controller/OAuth2Controller.java
-
ui-ngx/src/app/core/auth/auth.service.ts
|
|
@ -75,7 +75,7 @@ public class OAuth2Controller extends BaseController { |
|
|
@ApiOperation(value = "Get OAuth2 clients (getOAuth2Clients)", notes = "Get the list of OAuth2 clients " + |
|
|
@ApiOperation(value = "Get OAuth2 clients (getOAuth2Clients)", notes = "Get the list of OAuth2 clients " + |
|
|
"to log in with, available for such domain scheme (HTTP or HTTPS) (if x-forwarded-proto request header is present - " + |
|
|
"to log in with, available for such domain scheme (HTTP or HTTPS) (if x-forwarded-proto request header is present - " + |
|
|
"the scheme is known from it) and domain name and port (port may be known from x-forwarded-port header)") |
|
|
"the scheme is known from it) and domain name and port (port may be known from x-forwarded-port header)") |
|
|
@PostMapping(value = "/noauth/oauth2/client") |
|
|
@PostMapping(value = "/noauth/oauth2Clients") |
|
|
public List<OAuth2ClientLoginInfo> getOAuth2Clients(HttpServletRequest request, |
|
|
public List<OAuth2ClientLoginInfo> getOAuth2Clients(HttpServletRequest request, |
|
|
@Parameter(description = "Mobile application package name, to find OAuth2 clients " + |
|
|
@Parameter(description = "Mobile application package name, to find OAuth2 clients " + |
|
|
"where there is configured mobile application with such package name") |
|
|
"where there is configured mobile application with such package name") |
|
|
|
|
|
@ -224,7 +224,7 @@ export class AuthService { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public loadOAuth2Clients(): Observable<Array<OAuth2ClientLoginInfo>> { |
|
|
public loadOAuth2Clients(): Observable<Array<OAuth2ClientLoginInfo>> { |
|
|
const url = '/api/noauth/oauth2/client?platform=' + PlatformType.WEB; |
|
|
const url = '/api/noauth/oauth2Clients?platform=' + PlatformType.WEB; |
|
|
return this.http.post<Array<OAuth2ClientLoginInfo>>(url, |
|
|
return this.http.post<Array<OAuth2ClientLoginInfo>>(url, |
|
|
null, defaultHttpOptions()).pipe( |
|
|
null, defaultHttpOptions()).pipe( |
|
|
catchError(err => of([])), |
|
|
catchError(err => of([])), |
|
|
|