Skip to content

Commit

Permalink
CIL-575 Better handling of OAuth2 createTransaction errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
terrencegf committed Jul 2, 2019
1 parent dea66a8 commit 8355af8
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/Service/DBService.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,43 @@ class DBService
'STATUS_CLIENT_NOT_FOUND' => 0xFFFFF,
'STATUS_TRANSACTION_NOT_FOUND' => 0x10001,
'STATUS_EPTID_MISMATCH' => 0x100001,
'STATUS_EXPIRED_TOKEN' => 0x10003,
'STATUS_CREATE_TRANSACTION_FAILED' => 0x10005,
'STATUS_UNKNOWN_CALLBACK' => 0x10007,
'STATUS_MISSING_CLIENT_ID' => 0x10009,
'STATUS_NO_REGISTERED_CALLBACKS' => 0x1000B,
'STATUS_UNKNOWN_CLIENT' => 0x1000D,
'STATUS_UNAPPROVED_CLIENT' => 0x1000F
);

public static $STATUS_TEXT = array(
'STATUS_OK' => 'Status OK.',
'STATUS_ACTION_NOT_FOUND' => 'Action not found.',
'STATUS_NEW_USER' => 'New user created.',
'STATUS_USER_UPDATED' => 'User data updated.',
'STATUS_USER_NOT_FOUND' => 'User not found.',
'STATUS_USER_EXISTS' => 'User exists.',
'STATUS_USER_EXISTS_ERROR' => 'User already exists.',
'STATUS_USER_NOT_FOUND_ERROR' => 'User not found.',
'STATUS_TRANSACTION_NOT_FOUND' => 'Transaction not found.',
'STATUS_IDP_SAVE_FAILED' => 'Could not save IdPs.',
'STATUS_DUPLICATE_PARAMETER_FOUND' => 'Duplicate parameter.',
'STATUS_INTERNAL_ERROR' => 'Internal error.',
'STATUS_SAVE_IDP_FAILED' => 'Could not save IdP.',
'STATUS_MALFORMED_INPUT_ERROR' => 'Malformed input.',
'STATUS_MISSING_PARAMETER_ERROR' => 'Missing parameter.',
'STATUS_NO_REMOTE_USER' => 'Missing Remote User.',
'STATUS_NO_IDENTITY_PROVIDER' => 'Missing IdP.',
'STATUS_CLIENT_NOT_FOUND' => 'Missing client.',
'STATUS_TRANSACTION_NOT_FOUND' => 'Transaction not found.',
'STATUS_EPTID_MISMATCH' => 'EPTID mismatch.',
'STATUS_EXPIRED_TOKEN' => 'Expired token.',
'STATUS_CREATE_TRANSACTION_FAILED' => 'Failed to initialize OIDC flow.',
'STATUS_UNKNOWN_CALLBACK' => 'The redirect_uri does not match a registered callback URI.',
'STATUS_MISSING_CLIENT_ID' => 'Missing client_id parameter.',
'STATUS_NO_REGISTERED_CALLBACKS' => 'No registered callback URIs.',
'STATUS_UNKNOWN_CLIENT' => 'Unknown client_id.',
'STATUS_UNAPPROVED_CLIENT' => 'Client has not been approved.'
);

/**
Expand Down

0 comments on commit 8355af8

Please sign in to comment.