Skip to content

Commit

Permalink
Deploying to gh-pages from @ 06b2ef2 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
arnegns committed May 14, 2024
1 parent f7d6681 commit c8602fd
Show file tree
Hide file tree
Showing 168 changed files with 5,145 additions and 4,986 deletions.
26 changes: 16 additions & 10 deletions classes/SchulconnexRestClient.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ <h3 id="methods">
<td class="col-md-4">

<div class="io-description">
<b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>
<b>Returns : </b> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/boolean" target="_blank" >boolean</a></code>

</div>
</td>
Expand Down Expand Up @@ -622,8 +622,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="72"
class="link-to-prism">apps/server/src/infra/schulconnex-client/schulconnex-rest-client.ts:72</a></div>
<div class="io-line">Defined in <a href="" data-line="74"
class="link-to-prism">apps/server/src/infra/schulconnex-client/schulconnex-rest-client.ts:74</a></div>
</td>
</tr>

Expand Down Expand Up @@ -724,8 +724,8 @@ <h3 id="methods">

<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="86"
class="link-to-prism">apps/server/src/infra/schulconnex-client/schulconnex-rest-client.ts:86</a></div>
<div class="io-line">Defined in <a href="" data-line="88"
class="link-to-prism">apps/server/src/infra/schulconnex-client/schulconnex-rest-client.ts:88</a></div>
</td>
</tr>

Expand Down Expand Up @@ -775,7 +775,7 @@ <h3 id="methods">
private readonly logger: Logger
) {
this.checkOptions();
this.SCHULCONNEX_API_BASE_URL &#x3D; options.apiUrl;
this.SCHULCONNEX_API_BASE_URL &#x3D; options.apiUrl || &#x27;&#x27;;
}

// TODO: N21-1678 use this in provisioning module
Expand Down Expand Up @@ -816,10 +816,12 @@ <h3 id="methods">
return response;
}

private checkOptions(): void {
private checkOptions(): boolean {
if (!this.options.apiUrl || !this.options.clientId || !this.options.clientSecret || !this.options.tokenEndpoint) {
this.logger.debug(new SchulconnexConfigurationMissingLoggable());
return false;
}
return true;
}

private async getRequest&lt;T&gt;(url: URL, accessToken: string, timeout?: number): Promise&lt;T&gt; {
Expand All @@ -839,13 +841,17 @@ <h3 id="methods">
private async requestClientCredentialToken(): Promise&lt;OAuthTokenDto&gt; {
const { tokenEndpoint, clientId, clientSecret } &#x3D; this.options;

if (!this.checkOptions()) {
return Promise.reject(new Error(&#x27;Missing configuration for SchulconnexRestClient&#x27;));
}

const payload: ClientCredentialsGrantTokenRequest &#x3D; new ClientCredentialsGrantTokenRequest({
client_id: clientId,
client_secret: clientSecret,
client_id: clientId ?? &#x27;&#x27;,
client_secret: clientSecret ?? &#x27;&#x27;,
grant_type: OAuthGrantType.CLIENT_CREDENTIALS_GRANT,
});

const tokenDto: OAuthTokenDto &#x3D; await this.oauthAdapterService.sendTokenRequest(tokenEndpoint, payload);
const tokenDto: OAuthTokenDto &#x3D; await this.oauthAdapterService.sendTokenRequest(tokenEndpoint ?? &#x27;&#x27;, payload);

return tokenDto;
}
Expand Down
2 changes: 1 addition & 1 deletion coverage.html
Original file line number Diff line number Diff line change
Expand Up @@ -17585,7 +17585,7 @@
<td>ServerConfig</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/51)</span>
<span class="coverage-count">(0/55)</span>
</td>
</tr>
<tr class="low">
Expand Down
32 changes: 28 additions & 4 deletions interfaces/SchulconnexRestClientOptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,21 @@ <h6><b>Properties</b></h6>
<td class="col-md-4">
<ul class="index-list">
<li>
<span class="modifier">Optional</span>
<a href="#apiUrl"
>
apiUrl
</a>
</li>
<li>
<span class="modifier">Optional</span>
<a href="#clientId"
>
clientId
</a>
</li>
<li>
<span class="modifier">Optional</span>
<a href="#clientSecret"
>
clientSecret
Expand All @@ -164,6 +167,7 @@ <h6><b>Properties</b></h6>
</a>
</li>
<li>
<span class="modifier">Optional</span>
<a href="#tokenEndpoint"
>
tokenEndpoint
Expand Down Expand Up @@ -207,6 +211,11 @@ <h3 id="inputs">Properties</h3>
</td>
</tr>

<tr>
<td class="col-md-4">
<i>Optional</i>
</td>
</tr>



Expand Down Expand Up @@ -240,6 +249,11 @@ <h3 id="inputs">Properties</h3>
</td>
</tr>

<tr>
<td class="col-md-4">
<i>Optional</i>
</td>
</tr>



Expand Down Expand Up @@ -273,6 +287,11 @@ <h3 id="inputs">Properties</h3>
</td>
</tr>

<tr>
<td class="col-md-4">
<i>Optional</i>
</td>
</tr>



Expand Down Expand Up @@ -344,6 +363,11 @@ <h3 id="inputs">Properties</h3>
</td>
</tr>

<tr>
<td class="col-md-4">
<i>Optional</i>
</td>
</tr>



Expand All @@ -356,13 +380,13 @@ <h3 id="inputs">Properties</h3>

<div class="tab-pane fade tab-source-code" id="source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">export interface SchulconnexRestClientOptions {
apiUrl: string;
apiUrl?: string;

tokenEndpoint: string;
tokenEndpoint?: string;

clientId: string;
clientId?: string;

clientSecret: string;
clientSecret?: string;

personenInfoTimeoutInMs?: number;
}
Expand Down
176 changes: 174 additions & 2 deletions interfaces/ServerConfig.html
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,30 @@ <h6><b>Properties</b></h6>
SC_TITLE
</a>
</li>
<li>
<a href="#SCHULCONNEX_CLIENT__API_URL"
>
SCHULCONNEX_CLIENT__API_URL
</a>
</li>
<li>
<a href="#SCHULCONNEX_CLIENT__CLIENT_ID"
>
SCHULCONNEX_CLIENT__CLIENT_ID
</a>
</li>
<li>
<a href="#SCHULCONNEX_CLIENT__CLIENT_SECRET"
>
SCHULCONNEX_CLIENT__CLIENT_SECRET
</a>
</li>
<li>
<a href="#SCHULCONNEX_CLIENT__TOKEN_ENDPOINT"
>
SCHULCONNEX_CLIENT__TOKEN_ENDPOINT
</a>
</li>
<li>
<a href="#TEACHER_STUDENT_VISIBILITY__IS_ENABLED_BY_DEFAULT"
>
Expand Down Expand Up @@ -1968,6 +1992,138 @@ <h3 id="inputs">Properties</h3>



</tbody>
</table>
<table class="table table-sm table-bordered">
<tbody>
<tr>
<td class="col-md-4">
<a name="SCHULCONNEX_CLIENT__API_URL"></a>
<span class="name "><b>SCHULCONNEX_CLIENT__API_URL</b>
<a href="#SCHULCONNEX_CLIENT__API_URL">
<span class="icon ion-ios-link"></span>
</a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<code>SCHULCONNEX_CLIENT__API_URL: <code>string | undefined</code>
</code>
</td>
</tr>


<tr>
<td class="col-md-4">
<i>Type : </i> <code>string | undefined</code>

</td>
</tr>





</tbody>
</table>
<table class="table table-sm table-bordered">
<tbody>
<tr>
<td class="col-md-4">
<a name="SCHULCONNEX_CLIENT__CLIENT_ID"></a>
<span class="name "><b>SCHULCONNEX_CLIENT__CLIENT_ID</b>
<a href="#SCHULCONNEX_CLIENT__CLIENT_ID">
<span class="icon ion-ios-link"></span>
</a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<code>SCHULCONNEX_CLIENT__CLIENT_ID: <code>string | undefined</code>
</code>
</td>
</tr>


<tr>
<td class="col-md-4">
<i>Type : </i> <code>string | undefined</code>

</td>
</tr>





</tbody>
</table>
<table class="table table-sm table-bordered">
<tbody>
<tr>
<td class="col-md-4">
<a name="SCHULCONNEX_CLIENT__CLIENT_SECRET"></a>
<span class="name "><b>SCHULCONNEX_CLIENT__CLIENT_SECRET</b>
<a href="#SCHULCONNEX_CLIENT__CLIENT_SECRET">
<span class="icon ion-ios-link"></span>
</a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<code>SCHULCONNEX_CLIENT__CLIENT_SECRET: <code>string | undefined</code>
</code>
</td>
</tr>


<tr>
<td class="col-md-4">
<i>Type : </i> <code>string | undefined</code>

</td>
</tr>





</tbody>
</table>
<table class="table table-sm table-bordered">
<tbody>
<tr>
<td class="col-md-4">
<a name="SCHULCONNEX_CLIENT__TOKEN_ENDPOINT"></a>
<span class="name "><b>SCHULCONNEX_CLIENT__TOKEN_ENDPOINT</b>
<a href="#SCHULCONNEX_CLIENT__TOKEN_ENDPOINT">
<span class="icon ion-ios-link"></span>
</a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<code>SCHULCONNEX_CLIENT__TOKEN_ENDPOINT: <code>string | undefined</code>
</code>
</td>
</tr>


<tr>
<td class="col-md-4">
<i>Type : </i> <code>string | undefined</code>

</td>
</tr>





</tbody>
</table>
<table class="table table-sm table-bordered">
Expand Down Expand Up @@ -2144,6 +2300,7 @@ <h3 id="inputs">Properties</h3>
import type { IdentityManagementConfig } from &#x27;@infra/identity-management&#x27;;
import type { SchulconnexClientConfig } from &#x27;@infra/schulconnex-client&#x27;;
import type { AccountConfig } from &#x27;@modules/account&#x27;;
import { AlertConfig } from &#x27;@modules/alert&#x27;;
import type { AuthenticationConfig, XApiKeyConfig } from &#x27;@modules/authentication&#x27;;
import type { BoardConfig } from &#x27;@modules/board&#x27;;
import type { MediaBoardConfig } from &#x27;@modules/board/media-board.config&#x27;;
Expand All @@ -2163,10 +2320,9 @@ <h3 id="inputs">Properties</h3>
import type { UserLoginMigrationConfig } from &#x27;@modules/user-login-migration&#x27;;
import { type IVideoConferenceSettings, VideoConferenceConfiguration } from &#x27;@modules/video-conference&#x27;;
import { LanguageType } from &#x27;@shared/domain/interface&#x27;;
import { SchulcloudTheme } from &#x27;@shared/domain/types&#x27;;
import type { CoreModuleConfig } from &#x27;@src/core&#x27;;
import type { MailConfig } from &#x27;@src/infra/mail/interfaces/mail-config&#x27;;
import { AlertConfig } from &#x27;@modules/alert&#x27;;
import { SchulcloudTheme } from &#x27;@shared/domain/types&#x27;;
import { Timezone } from &#x27;./types/timezone.enum&#x27;;

export enum NodeEnvType {
Expand Down Expand Up @@ -2254,6 +2410,10 @@ <h3 id="inputs">Properties</h3>
I18N__DEFAULT_TIMEZONE: Timezone;
BOARD_COLLABORATION_URI: string;
FEATURE_NEW_LAYOUT_ENABLED: boolean;
SCHULCONNEX_CLIENT__API_URL: string | undefined;
SCHULCONNEX_CLIENT__TOKEN_ENDPOINT: string | undefined;
SCHULCONNEX_CLIENT__CLIENT_ID: string | undefined;
SCHULCONNEX_CLIENT__CLIENT_SECRET: string | undefined;
}

const config: ServerConfig &#x3D; {
Expand Down Expand Up @@ -2365,6 +2525,18 @@ <h3 id="inputs">Properties</h3>
I18N__DEFAULT_LANGUAGE: Configuration.get(&#x27;I18N__DEFAULT_LANGUAGE&#x27;) as unknown as LanguageType,
I18N__FALLBACK_LANGUAGE: Configuration.get(&#x27;I18N__FALLBACK_LANGUAGE&#x27;) as unknown as LanguageType,
I18N__DEFAULT_TIMEZONE: Configuration.get(&#x27;I18N__DEFAULT_TIMEZONE&#x27;) as Timezone,
SCHULCONNEX_CLIENT__API_URL: Configuration.has(&#x27;SCHULCONNEX_CLIENT__API_URL&#x27;)
? (Configuration.get(&#x27;SCHULCONNEX_CLIENT__API_URL&#x27;) as string)
: undefined,
SCHULCONNEX_CLIENT__TOKEN_ENDPOINT: Configuration.has(&#x27;SCHULCONNEX_CLIENT__TOKEN_ENDPOINT&#x27;)
? (Configuration.get(&#x27;SCHULCONNEX_CLIENT__TOKEN_ENDPOINT&#x27;) as string)
: undefined,
SCHULCONNEX_CLIENT__CLIENT_ID: Configuration.has(&#x27;SCHULCONNEX_CLIENT__CLIENT_ID&#x27;)
? (Configuration.get(&#x27;SCHULCONNEX_CLIENT__CLIENT_ID&#x27;) as string)
: undefined,
SCHULCONNEX_CLIENT__CLIENT_SECRET: Configuration.has(&#x27;SCHULCONNEX_CLIENT__CLIENT_SECRET&#x27;)
? (Configuration.get(&#x27;SCHULCONNEX_CLIENT__CLIENT_SECRET&#x27;) as string)
: undefined,
SCHULCONNEX_CLIENT__PERSONEN_INFO_TIMEOUT_IN_MS: Configuration.get(
&#x27;SCHULCONNEX_CLIENT__PERSONEN_INFO_TIMEOUT_IN_MS&#x27;
) as number,
Expand Down
Loading

0 comments on commit c8602fd

Please sign in to comment.