Skip to content

Commit

Permalink
Project import generated by Copybara.
Browse files Browse the repository at this point in the history
FolderOrigin-RevId: /usr/src/app/bi-sdk-js
  • Loading branch information
ismailmustafa authored and bi-ci-bot committed Apr 28, 2023
1 parent 3a1dac5 commit c7870d5
Show file tree
Hide file tree
Showing 31 changed files with 541 additions and 490 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unpublished

## [2.0.2] - 2023-04-20

### Added

- Support for Webauthn in Safari
- Support for Webauthn on Android devices using SafetyNet
- Support for Webauthn on Windows 11 devices

### Changed

- Removed remaining typealiases as they were unnecessary.

### Fixed

- Issue where the SDK was failing to compile in Angular applications.

## [2.0.1] - 2023-03-22

### Changed
Expand Down
103 changes: 60 additions & 43 deletions coresdk/dist/bi-core.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions coresdk/dist/src/core.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Configuration } from "./configuration";
import { MockConfiguration } from "./mock";
import { CoreDispatch } from "./coreDispatch";
import { Credential, CredentialV1, BindCredentialV1Result, PkceCodeChallenge, Pkce, TrustedSource, AuthorizationCode, UrlResponse, TokenResponse, BrowserInfo, CredentialId } from "./types";
import { Credential, CredentialV1, BindCredentialV1Result, PkceCodeChallenge, Pkce, TrustedSource, AuthorizationCode, UrlResponse, TokenResponse, BrowserInfo } from "./types";
import { Log } from "./log";
import { HostEvents, ExportEvent, ImportEvent } from "./host";
import { BIAuthenticateUrlResponse } from "./types/credential";
Expand Down Expand Up @@ -40,12 +40,12 @@ export declare class Core {
createPKCE: () => Promise<Pkce>;
createCredential: (handle: string, name: string, imageUrl: string, loginUri?: string | undefined, enrollUri?: string | undefined) => Promise<Credential>;
deleteCredential: (handle: string) => Promise<void>;
deleteCredentialV1: (id: CredentialId) => Promise<void>;
deleteCredentialV1: (id: string) => Promise<void>;
authenticateConfidential: (authURL: string, clientId: string, redirectURI: string, scope: string, PKCECodeChallenge?: PkceCodeChallenge | undefined, nonce?: string | undefined) => Promise<AuthorizationCode>;
/**
* Authenticates a credential.
*/
authenticate: (url: string, credentialId: CredentialId | undefined, trusted: TrustedSource, onSelectCredential?: ((credentials: CredentialV1[]) => Promise<string | undefined>) | undefined) => Promise<BIAuthenticateUrlResponse>;
authenticate: (url: string, credentialId: string | undefined, trusted: TrustedSource, onSelectCredential?: ((credentials: CredentialV1[]) => Promise<string | undefined>) | undefined) => Promise<BIAuthenticateUrlResponse>;
authenticatePublic: (authURL: string, tokenURL: string, clientId: string, redirectURI: string, nonce?: string | undefined) => Promise<TokenResponse>;
/**
* Begins an export of the specified credential.
Expand Down
6 changes: 3 additions & 3 deletions coresdk/dist/src/coreDispatch.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Configuration } from "./configuration";
import { Types as Messaging } from "./messaging";
import { Pkce, PkceCodeChallenge, TrustedSource, AuthorizationCode, UrlResponse, TokenResponse, BrowserInfo, Credential, BindCredentialV1Result, CredentialV1, KeyType, CredentialId } from "./types";
import { Pkce, PkceCodeChallenge, TrustedSource, AuthorizationCode, UrlResponse, TokenResponse, BrowserInfo, Credential, BindCredentialV1Result, CredentialV1, KeyType } from "./types";
import { Host } from "./host";
import { BIAuthenticateUrlResponse } from "./types/credential";
/**
Expand All @@ -16,8 +16,8 @@ export interface CoreDispatch {
createPkce(): Promise<Pkce>;
createCredential(handle: string, name: string, imageUrl: string, loginUri?: string, enrollUri?: string): Promise<Credential>;
deleteCredential(handle: string): Promise<void>;
deleteCredentialV1(id: CredentialId): Promise<void>;
authenticate(url: string, credentialId: CredentialId | undefined, trusted: TrustedSource, onSelectCredential?: (credentials: CredentialV1[]) => Promise<string | undefined>): Promise<BIAuthenticateUrlResponse>;
deleteCredentialV1(id: string): Promise<void>;
authenticate(url: string, credentialId: string | undefined, trusted: TrustedSource, onSelectCredential?: (credentials: CredentialV1[]) => Promise<string | undefined>): Promise<BIAuthenticateUrlResponse>;
authenticateConfidential(authURL: string, clientId: string, redirectURI: string, scope: string, PKCECodeChallenge?: PkceCodeChallenge, nonce?: string): Promise<AuthorizationCode>;
authenticatePublic(authURL: string, tokenURL: string, clientId: string, redirectURI: string, nonce?: string): Promise<TokenResponse>;
export(handle: string): Promise<void>;
Expand Down
6 changes: 3 additions & 3 deletions coresdk/dist/src/mock/mockDispatch.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Host } from "../host";
import { CoreDispatch } from "../coreDispatch";
import { DispatchData } from "./mockConfig";
import { Credential, PkceCodeChallenge, Pkce, TrustedSource, AuthorizationCode, UrlResponse, TokenResponse, BrowserInfo, BindCredentialV1Result, CredentialV1, KeyType, CredentialId } from "../types";
import { Credential, PkceCodeChallenge, Pkce, TrustedSource, AuthorizationCode, UrlResponse, TokenResponse, BrowserInfo, BindCredentialV1Result, CredentialV1, KeyType } from "../types";
import { UrlType } from "../messaging/types";
import { Configuration } from "../configuration";
import { BIAuthenticateUrlResponse } from "../types/credential";
Expand All @@ -17,8 +17,8 @@ export declare class MockDispatch implements CoreDispatch {
createPkce(): Promise<Pkce>;
createCredential(handle: string, name: string, imageUrl: string, loginUri?: string, enrollUri?: string): Promise<Credential>;
deleteCredential(handle: string): Promise<void>;
deleteCredentialV1(id: CredentialId): Promise<void>;
authenticate(url: string, credentialId: CredentialId | undefined, trusted: TrustedSource, onSelectCredential?: (credentials: CredentialV1[]) => Promise<string | undefined>): Promise<BIAuthenticateUrlResponse>;
deleteCredentialV1(id: string): Promise<void>;
authenticate(url: string, credentialId: string | undefined, trusted: TrustedSource, onSelectCredential?: (credentials: CredentialV1[]) => Promise<string | undefined>): Promise<BIAuthenticateUrlResponse>;
authenticateConfidential(authURL: string, clientId: string, redirectURI: string, scope: string, PKCECodeChallenge?: PkceCodeChallenge, nonce?: string): Promise<AuthorizationCode>;
authenticatePublic(authURL: string, tokenURL: string, clientId: string, redirectURI: string, nonce?: string): Promise<TokenResponse>;
export(handle: string): Promise<void>;
Expand Down
2 changes: 1 addition & 1 deletion coresdk/dist/src/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { CertHandle, KeyHandle, ProfileHandle } from "./handles";
export { Credential, UrlResponse, BIAuthenticateUrlResponse } from "./credential";
export { CredentialV1, RealmV1, ThemeV1, IdentityV1, BindCredentialV1Result, CredentialId, RealmId, TenantId, IdentityId, CredentialBindingJobId, } from "./v1";
export { CredentialV1, RealmV1, ThemeV1, IdentityV1, BindCredentialV1Result, } from "./v1";
export { State, KeyType, IntegrityFailureError } from "./credential";
export { Pkce, PkceCodeChallenge } from "./pkce";
export { BrowserInfo } from "./browserInfo";
Expand Down
11 changes: 3 additions & 8 deletions coresdk/dist/src/types/v1.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import { KeyType } from "./credential";
import { KeyHandle } from "./handles";
export declare type TenantId = string;
export declare type RealmId = string;
export declare type IdentityId = string;
export declare type CredentialId = string;
export declare type CredentialBindingJobId = string;
/**
* Credential in the directory V1 sense
*/
Expand All @@ -24,11 +19,11 @@ export interface CredentialV1 {
theme: ThemeV1;
}
export interface RealmV1 {
id: RealmId;
id: string;
displayName: string;
}
export interface IdentityV1 {
id: IdentityId;
id: string;
displayName: string;
username: string;
primaryEmailAddress?: string;
Expand All @@ -39,7 +34,7 @@ export interface ThemeV1 {
supportUrl: string;
}
export interface TenantV1 {
id: TenantId;
id: string;
displayName: string;
}
/**
Expand Down
10 changes: 5 additions & 5 deletions coresdk/lib/kmc/kmc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ export interface InitOutput {
readonly __wbindgen_malloc: (a: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
readonly __wbindgen_export_2: WebAssembly.Table;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h13c9ee9e465ef39b: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8250fbe5e901b07b: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7bb17e2ae7f7581b: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h36814b257cb21bb3: (a: number, b: number, c: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hac28956bd554ad35: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbfecb83208773a15: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h19865b07147afc89: (a: number, b: number) => void;
readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc71e64e004c44ff0: (a: number, b: number, c: number) => void;
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
readonly __wbindgen_exn_store: (a: number) => void;
readonly wasm_bindgen__convert__closures__invoke2_mut__h14beb388b4b6a1c5: (a: number, b: number, c: number, d: number) => void;
readonly wasm_bindgen__convert__closures__invoke2_mut__h22c2f0768bc2fe65: (a: number, b: number, c: number, d: number) => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;
Expand Down
76 changes: 38 additions & 38 deletions coresdk/lib/kmc/kmc.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions coresdk/lib/kmc/kmc_bg.wasm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ export function kmc_url_type(a: number, b: number): void;
export function __wbindgen_malloc(a: number): number;
export function __wbindgen_realloc(a: number, b: number, c: number): number;
export const __wbindgen_export_2: WebAssembly.Table;
export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h13c9ee9e465ef39b(a: number, b: number): void;
export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h8250fbe5e901b07b(a: number, b: number): void;
export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7bb17e2ae7f7581b(a: number, b: number): void;
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h36814b257cb21bb3(a: number, b: number, c: number): void;
export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hac28956bd554ad35(a: number, b: number): void;
export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbfecb83208773a15(a: number, b: number): void;
export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h19865b07147afc89(a: number, b: number): void;
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc71e64e004c44ff0(a: number, b: number, c: number): void;
export function __wbindgen_add_to_stack_pointer(a: number): number;
export function __wbindgen_exn_store(a: number): void;
export function wasm_bindgen__convert__closures__invoke2_mut__h14beb388b4b6a1c5(a: number, b: number, c: number, d: number): void;
export function wasm_bindgen__convert__closures__invoke2_mut__h22c2f0768bc2fe65(a: number, b: number, c: number, d: number): void;
Original file line number Diff line number Diff line change
Expand Up @@ -4425,10 +4425,8 @@ async function getWebAuthnSupport() {
return false;
}
async function hasWebAuthn() {
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
const isAndroid = /android/im.test(navigator.userAgent);
const windowsVersion = await getWindowsVersion();
return !!(!isSafari && !isAndroid && windowsVersion < 0 && await getWebAuthnSupport());
return !!((windowsVersion < 0 || windowsVersion >= 11) && await getWebAuthnSupport());
}
function hasSubtleCrypto() {
return !!window.crypto.subtle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3802,6 +3802,7 @@ var device = $root.device = (() => {
DeviceInfo.prototype.locale = null;
DeviceInfo.prototype.intuneManagedDeviceName = null;
DeviceInfo.prototype.intuneDeviceId = null;
DeviceInfo.prototype.jamfProId = null;
DeviceInfo.create = function create(properties) {
return new DeviceInfo(properties);
};
Expand Down Expand Up @@ -3858,6 +3859,8 @@ var device = $root.device = (() => {
$root.device.StringMaybe.encode(message.intuneManagedDeviceName, writer.uint32(194).fork()).ldelim();
if (message.intuneDeviceId != null && Object.hasOwnProperty.call(message, "intuneDeviceId"))
$root.device.StringMaybe.encode(message.intuneDeviceId, writer.uint32(202).fork()).ldelim();
if (message.jamfProId != null && Object.hasOwnProperty.call(message, "jamfProId"))
$root.device.StringMaybe.encode(message.jamfProId, writer.uint32(210).fork()).ldelim();
return writer;
};
DeviceInfo.encodeDelimited = function encodeDelimited(message, writer) {
Expand Down Expand Up @@ -3945,6 +3948,9 @@ var device = $root.device = (() => {
case 25:
message.intuneDeviceId = $root.device.StringMaybe.decode(reader, reader.uint32());
break;
case 26:
message.jamfProId = $root.device.StringMaybe.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
Expand Down Expand Up @@ -4097,6 +4103,11 @@ var device = $root.device = (() => {
if (error)
return "intuneDeviceId." + error;
}
if (message.jamfProId != null && message.hasOwnProperty("jamfProId")) {
let error = $root.device.StringMaybe.verify(message.jamfProId);
if (error)
return "jamfProId." + error;
}
return null;
};
DeviceInfo.fromObject = function fromObject(object) {
Expand Down Expand Up @@ -4262,6 +4273,11 @@ var device = $root.device = (() => {
throw TypeError(".device.DeviceInfo.intuneDeviceId: object expected");
message.intuneDeviceId = $root.device.StringMaybe.fromObject(object.intuneDeviceId);
}
if (object.jamfProId != null) {
if (typeof object.jamfProId !== "object")
throw TypeError(".device.DeviceInfo.jamfProId: object expected");
message.jamfProId = $root.device.StringMaybe.fromObject(object.jamfProId);
}
return message;
};
DeviceInfo.toObject = function toObject(message, options) {
Expand Down Expand Up @@ -4294,6 +4310,7 @@ var device = $root.device = (() => {
object.locale = null;
object.intuneManagedDeviceName = null;
object.intuneDeviceId = null;
object.jamfProId = null;
}
if (message.answer != null && message.hasOwnProperty("answer"))
object.answer = $root.device.Answer.toObject(message.answer, options);
Expand Down Expand Up @@ -4345,6 +4362,8 @@ var device = $root.device = (() => {
object.intuneManagedDeviceName = $root.device.StringMaybe.toObject(message.intuneManagedDeviceName, options);
if (message.intuneDeviceId != null && message.hasOwnProperty("intuneDeviceId"))
object.intuneDeviceId = $root.device.StringMaybe.toObject(message.intuneDeviceId, options);
if (message.jamfProId != null && message.hasOwnProperty("jamfProId"))
object.jamfProId = $root.device.StringMaybe.toObject(message.jamfProId, options);
return object;
};
DeviceInfo.prototype.toJSON = function toJSON() {
Expand Down
10 changes: 5 additions & 5 deletions coresdk/node_modules/kmc-ffi/kmc.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c7870d5

Please sign in to comment.