Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement psd2 #125

Merged
merged 2 commits into from
May 8, 2019
Merged

Implement psd2 #125

merged 2 commits into from
May 8, 2019

Conversation

kojoru
Copy link
Contributor

@kojoru kojoru commented May 8, 2019

This PR adds PSD2 support to the SDK. It was tested and the whole flow works again sandbox.

Usage is along the lines of:

var psd2ApiContext = ApiContext.CreateForPsd2(environmentType, certificate, certificateChain, 
    deviceDescription, permittedIps);
BunqContext.LoadApiContext(psd2ApiContext);
var allOauthClient = OauthClient.List();
if (!allOauthClient.Value.Any())
{
    OauthClient.Create("ACTIVE");
    allOauthClient = OauthClient.List();
}

var client = allOauthClient.Value.First();
Debug.Assert(client.Id != null, "client.Id != null");
if (OauthCallbackUrl.List(client.Id.Value).Value.All(ocu => ocu.Url != redirectUri))
{
    OauthCallbackUrl.Create(client.Id.Value, redirectUri);
}

Console.WriteLine(JsonConvert.SerializeObject(client));

This PR closes/fixes the following issues:

@kojoru kojoru requested a review from andrederoos May 8, 2019 10:18
BunqSdk/Context/SessionContext.cs Show resolved Hide resolved
BunqSdk/Context/SessionContext.cs Show resolved Hide resolved
BunqSdk/Security/SecurityUtils.cs Show resolved Hide resolved
BunqSdk/Security/SecurityUtils.cs Show resolved Hide resolved
@andrederoos andrederoos merged commit da9d8b9 into develop May 8, 2019
@andrederoos andrederoos deleted the bunq/sdk_csharp#124_implement_psd2 branch May 8, 2019 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PSD2 Support
2 participants