0xmatt / ngx-oauth-client Goto Github PK
View Code? Open in Web Editor NEWAn Angular4+ compatible OAuth2.0 compliant HTTP wrapper.
Home Page: https://0xMatt.github.io/ngx-oauth-client
License: MIT License
An Angular4+ compatible OAuth2.0 compliant HTTP wrapper.
Home Page: https://0xMatt.github.io/ngx-oauth-client
License: MIT License
Hello, as discussed on a different issue (link), I would like to be able to have different hosts based on the functionality or data to access.
This means that the host param in the configuration api should be able to handle
As pointed out in the other issue the approach to extend and override should work in theory but as you said "this functionality will be removed", and I don't understand this statement.
I would like to know how much this is gonna last if I follow this path as you suggested.
I know this scenario could be not so common, but I'll give it a shot with your library before writing something from scratch.
As regards the implementation, as far as I can tell, the easiest way could be to add an optional parameter to the configuration api that stores 1 or more data hosts (all in the same network, sharing the auth token). What's behind the scene is a total mistery up to now, but I'll eventually dig into your code soon.
Thanks a lot in advance!
Could you upgrade to angular 6 soon ?
Thank you
Due to #3 and despite test coverage being at 96%, it needs to be thoroughly tested that all override parameters are properly tested and edge cases for each request method apply them correctly.
Having an issue with passing an object into .get. Only the last property in the passed in object is being used. ie .get('posts', {limit: 10, offset: 10}) builds the url /posts?offset=10 and will disregard all other properties.
Is it possibile to upgrade the package to angular 5?
As the title states, NgxRequest.setParams is only called if the request method is GET
. All other methods need to be able to make use of this if a params
key is set, however it will need to comply with the style that the HttpClient options uses, so it can't take object that we convert, but an instance of HttpParams itself. It's late, this is just a reminder to fix this tomorrow.
Hello, I'm trying to add auth header to my request, but it seems it gets lost at this point (ngx-request.js):
NgxRequest.prototype.setHeaders = function (headers, override) {
this.headers = new http_1.HttpHeaders(Object.assign(headers, override));
return this;
};
headers param is correctly populated with
Object {Authorization: "Bearer 2f8e3907-93c5-4cd1-a81b-554d4811a675"}
,
and override param is undefined.
The problem is at the point when the script create the new http_1.HttpHeaders object.
The returned object has:
HttpHeaders {normalizedNames: Map(0), lazyUpdate: null, lazyInit: }
Any hint? Thanks in advance!
Hello,
I am trying to get this working with OAuth and basic authentication.
So the client should be able to send a basic auth header in the token request, if I am correct this isn't implemented yet?
Can you confirm? If it's implemented, any example how to do this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.