Giter VIP home page Giter VIP logo

innofactor.suomifiidentificationclient's People

Contributors

ajsainio avatar alexengblom avatar jukkahyv avatar tapiokulmala avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

innofactor.suomifiidentificationclient's Issues

No implicit reference conversion from RshShaCrypto to ICertificateStore

When I add this registration:
services.AddScoped<ICertificateStore, RsaShaCrypto>();

the compiler complains and shows error:

Error CS0311 The type 'Innofactor.SuomiFiIdentificationClient.Support.RsaShaCrypto' cannot be used as type parameter 'TImplementation' in the generic type or method 'ServiceCollectionServiceExtensions.AddScoped<TService, TImplementation>(IServiceCollection)'. There is no implicit reference conversion from 'Innofactor.SuomiFiIdentificationClient.Support.RsaShaCrypto' to 'Innofactor.SuomiFiIdentificationClient.Support.ICertificateStore'

Suprising behavior in EncryptedCookieStorage

Suprising behavior in EncryptedCookieStorage

It seems the EncryptedCookieStorage type always reads the cookie from the network request object while setting the cookie goes to response object.

Could this behavior be altered so that response object is always checked first , if the backend service has already set new cookie information and reads it back during the same routine, it finds the already updated object instead of the old one.

https://github.com/Innofactor/Innofactor.SuomiFiIdentificationClient/blob/master/Innofactor.SuomiFiIdentificationClient/Support/EncryptedCookieStorage.cs#L28-L46

AesGcmDecryptor.Dispose() throws NotImplementedException

I ran into an issue when running the library that AesGcmDecryptorDispose() is called and it has no implementation so it causes the identification to crash. This might be a net7.0 issue. Perhaps the earlier frameworks don't call it.

I made a fork from the release and tested by adding an empty implementation to the function:

public void Dispose() { }

This works and suomi.fi identication works with this change but it would be helpful to have the "fix" in the official release. As far as I can tell, the Dispose function doesn't have any cleanup to do as the class members are initialized in the constructor and would be freed when the object is no longer needed. And other objects taking memory are used in the TransformFinalBlock() function as local variables so they should be freed when the function exits. So, therefore an empty implementation of Dispose() should be enough?

Saml2HttpRedirect.Serialize() pads a lot of zeros to the end

I ran into a problem where the redirect URL to suomi.fi would have a lot of A/ 0:s at the end. After investigating the issue, I noticed that the Serialize function in Saml2HttpRedirect produces the extra As at the end. I tested the function with the proper XML output from suomi.fi and also with various strings. The behavior on all of them is the same.
For example, call Serialize("Hello") produces the following output:

8kjNyckHAAAA%2F%2F8DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA%3D%3D

And further investigation, the culprit seems to be the compressed.GetBuffer() call. Replacing GetBuffer() with ToArray() seems to fix the problem. Call Serialize("Hello") produces then:

8kjNyckHAAAA%2F%2F8DAA%3D%3D

And that output seems correct. My program is running on dotnet 7.0 so perhaps it's simply something caused by the version. Do you have any ideas what might be causing the problem and do you think changing the GetBuffer() call to ToArray() is a sufficient workaround?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.