mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-08 21:18:14 -05:00
* [INJIMOB-3392] add token request logic in wallet for vci flow Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392] chore: update integration of VCIClient native module Changes are updated as per new changes in the library Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-3390] refactor: event structure of token request Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-3392] fix tokenEndpoint method and refactorings Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392] cnonce decode from accesstoken and credential response destructuring fix Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3390] add: getIssuerMetadata in kotlin NativeModule Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-3393] fix: auth callback in android Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-3390] fix: proofJwt issue in download flow Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> * [INJIMOB-3392] fix credentialofferflow Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392]fix format issues in bridge layer Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392]fix activity log texts on application reopen Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392]cache issuer metadata by key: issuerhost Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392] fix error scenarios and cleanup issuermachine Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392] refactor request method to handle missing error scenarios Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392] fix max lines for txcode description to 2 Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392] rename credentialissueruri to credentialissuer Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392] take cnonce from outside accesstoken Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392] declare random-values at entry file Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392] set fallback keytype to user priority first Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392] add locales for network request failed error Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392] remove console log Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> * [INJIMOB-3392] refactor and clean up code Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> --------- Signed-off-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com> Signed-off-by: KiruthikaJeyashankar <kiruthikavjshankar@gmail.com> Co-authored-by: Abhishek Paul <paul.apaul.abhishek.ap@gmail.com>
55 lines
1.8 KiB
TypeScript
55 lines
1.8 KiB
TypeScript
import { createModel } from 'xstate/lib/model';
|
|
import {
|
|
CredentialTypes,
|
|
CredentialWrapper,
|
|
IssuerWellknownResponse,
|
|
VerifiableCredential,
|
|
} from '../VerifiableCredential/VCMetaMachine/vc';
|
|
import { AppServices } from '../../shared/GlobalContext';
|
|
import { VCMetadata } from '../../shared/VCMetadata';
|
|
import { IssuersEvents } from './IssuersEvents';
|
|
import { issuerType } from './IssuersMachine';
|
|
|
|
export const IssuersModel = createModel(
|
|
{
|
|
issuers: [] as issuerType[],
|
|
selectedIssuerId: '' as string,
|
|
qrData: '' as string,
|
|
selectedIssuer: {} as issuerType,
|
|
selectedIssuerWellknownResponse: {} as IssuerWellknownResponse,
|
|
tokenResponse: {} as object,
|
|
errorMessage: '' as string,
|
|
loadingReason: 'displayIssuers' as string,
|
|
verifiableCredential: null as VerifiableCredential | null,
|
|
selectedCredentialType: {} as CredentialTypes,
|
|
supportedCredentialTypes: [] as CredentialTypes[],
|
|
credentialWrapper: {} as CredentialWrapper,
|
|
serviceRefs: {} as AppServices,
|
|
verificationErrorMessage: '',
|
|
publicKey: '',
|
|
privateKey: '',
|
|
vcMetadata: {} as VCMetadata,
|
|
keyType: 'RS256' as string,
|
|
wellknownKeyTypes: [] as string[],
|
|
authEndpointToOpen: false as boolean,
|
|
isTransactionCodeRequested: false as boolean,
|
|
authEndpoint: '' as string,
|
|
accessToken: '' as string,
|
|
txCode: '' as string,
|
|
cNonce: '' as string,
|
|
isConsentRequested: false as boolean,
|
|
issuerLogo: '' as string,
|
|
issuerName: '' as string,
|
|
txCodeInputMode: '' as string,
|
|
txCodeDescription: '' as string,
|
|
txCodeLength: null as number | null,
|
|
isCredentialOfferFlow: false as boolean,
|
|
credentialOfferCredentialIssuer: {} as string,
|
|
tokenRequestObject: {} as object,
|
|
credentialConfigurationId: '' as string,
|
|
},
|
|
{
|
|
events: IssuersEvents,
|
|
},
|
|
);
|