Class OpenBiLoginExtensions
Extension methods for login and logout.
Inheritance
OpenBiLoginExtensions
Namespace: BiExcellence.OpenBi.Api.Commands
Assembly: BiExcellence.OpenBi.Api.dll
Syntax
public static class OpenBiLoginExtensions
Methods
FreeAsync(IOpenBiSession, CancellationToken)
Logout and free all resources of this session on the server.
Declaration
public static Task FreeAsync(this IOpenBiSession session, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IOpenBiSession | session | The session. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task |
OpenBiLoginAsync(IOpenBiSession, string, string, CancellationToken)
Login to the server. This will throw a OpenBiServerErrorException with Code of LoginFailed
Declaration
public static Task<ILoginInfo> OpenBiLoginAsync(this IOpenBiSession session, string username, string password, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IOpenBiSession | session | The session. |
| string | username | The username. |
| string | password | The password. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<ILoginInfo> | Information about the authenticated user. |
OpenBiLoginAsync(IOpenBiSession, CancellationToken)
Login to the server with SSO. This only works if the server is configured with USE_LDAP_PWD_CHECK=X
Declaration
public static Task<ILoginInfo> OpenBiLoginAsync(this IOpenBiSession session, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IOpenBiSession | session | The session. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<ILoginInfo> | Information about the authetificated user. |
Exceptions
| Type | Condition |
|---|---|
| HttpRequestException | Unauthorized thrown if the client does not support SSO. |