url
This commit is contained in:
@@ -14,29 +14,12 @@
|
||||
"secure": false,
|
||||
"changeOrigin": true
|
||||
},
|
||||
"/auth": {
|
||||
"/api": {
|
||||
"target": "http://localhost:3000",
|
||||
"secure": false,
|
||||
"changeOrigin": true
|
||||
},
|
||||
"/account": {
|
||||
"target": "http://localhost:3000",
|
||||
"secure": false,
|
||||
"changeOrigin": true
|
||||
},
|
||||
"/admin": {
|
||||
"target": "http://localhost:3000",
|
||||
"secure": false,
|
||||
"changeOrigin": true
|
||||
},
|
||||
"/password": {
|
||||
"target": "http://localhost:3000",
|
||||
"secure": false,
|
||||
"changeOrigin": true
|
||||
},
|
||||
"/registration": {
|
||||
"target": "http://localhost:3000",
|
||||
"secure": false,
|
||||
"changeOrigin": true
|
||||
"changeOrigin": true,
|
||||
"pathRewrite": {
|
||||
"^/api": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,11 +83,11 @@ interface CreatedOidcClient extends OidcClient {
|
||||
<article class="info-panel">
|
||||
<h2>Discovery</h2>
|
||||
<dl>
|
||||
<div><dt>Configuration</dt><dd>{{ apiBaseUrl }}/.well-known/openid-configuration</dd></div>
|
||||
<div><dt>Authorize</dt><dd>{{ apiBaseUrl }}/oidc/auth</dd></div>
|
||||
<div><dt>Token</dt><dd>{{ apiBaseUrl }}/oidc/token</dd></div>
|
||||
<div><dt>UserInfo</dt><dd>{{ apiBaseUrl }}/oidc/me</dd></div>
|
||||
<div><dt>JWKS</dt><dd>{{ apiBaseUrl }}/oidc/jwks</dd></div>
|
||||
<div><dt>Configuration</dt><dd>{{ oidcBaseUrl }}/.well-known/openid-configuration</dd></div>
|
||||
<div><dt>Authorize</dt><dd>{{ oidcBaseUrl }}/oidc/auth</dd></div>
|
||||
<div><dt>Token</dt><dd>{{ oidcBaseUrl }}/oidc/token</dd></div>
|
||||
<div><dt>UserInfo</dt><dd>{{ oidcBaseUrl }}/oidc/me</dd></div>
|
||||
<div><dt>JWKS</dt><dd>{{ oidcBaseUrl }}/oidc/jwks</dd></div>
|
||||
</dl>
|
||||
</article>
|
||||
</section>
|
||||
@@ -134,6 +134,7 @@ export class AdminOidcClientsComponent implements OnInit {
|
||||
readonly failed = signal(false);
|
||||
readonly message = signal('');
|
||||
readonly createdSecret = signal('');
|
||||
readonly oidcBaseUrl: string;
|
||||
readonly form;
|
||||
|
||||
constructor(
|
||||
@@ -141,6 +142,7 @@ export class AdminOidcClientsComponent implements OnInit {
|
||||
private readonly http: HttpClient,
|
||||
@Inject(API_BASE_URL) readonly apiBaseUrl: string,
|
||||
) {
|
||||
this.oidcBaseUrl = apiBaseUrl.endsWith('/api') ? apiBaseUrl.slice(0, -4) : apiBaseUrl;
|
||||
this.form = this.fb.nonNullable.group({
|
||||
clientName: ['', Validators.required],
|
||||
redirectUris: ['http://localhost:8080/callback', Validators.required],
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
window.__LDAP_PORTAL_CONFIG__ = {
|
||||
apiBaseUrl: ''
|
||||
apiBaseUrl: '/api'
|
||||
};
|
||||
|
||||
@@ -66,6 +66,6 @@ bootstrapApplication(AppComponent, {
|
||||
provideRouter(routes),
|
||||
provideHttpClient(withInterceptors([authInterceptor])),
|
||||
AuthService,
|
||||
{ provide: API_BASE_URL, useValue: window.__LDAP_PORTAL_CONFIG__?.apiBaseUrl ?? '' },
|
||||
{ provide: API_BASE_URL, useValue: window.__LDAP_PORTAL_CONFIG__?.apiBaseUrl ?? '/api' },
|
||||
],
|
||||
}).catch((error) => console.error(error));
|
||||
|
||||
Reference in New Issue
Block a user