Comments (4)
Hi @starsz, I find the proposal to adopt interfaces reasonable and your use case valid. Its a large undertaking however and a potentially backwards incompatible change (so a major version bump may be warranted).
Just to make sure you have explored the option, did you try to pass your own implementation of http.Client
? Its not exactly the same, but you can mock the HTTP layer by providing a custom client.
from auth0.
@alexkappa do you have an example where injecting a mock http client has been done for auth0 when unit testing?
from auth0.
Just to make sure you have explored the option, did you try to pass your own implementation of
http.Client
? Its not exactly the same, but you can mock the HTTP layer by providing a custom client.
func WithClient(client *http.Client) ManagementOption {
return func(m *Management) {
m.http = client
}
}
You can't pass an own implementation of http.Client
either because the function uses the http.Client struct type instead of an interface around the Do
method. Is there any other way to inject it?
from auth0.
Closed and cloned this issue to auth0/go-auth0#17
from auth0.
Related Issues (20)
- 403 Forbidden: Insufficient scope, expected any of: create:user_tickets HOT 1
- Extends the number of MFA options that are configurable through the api HOT 1
- Project Status HOT 6
- Can't update user email HOT 1
- Support for Actions HOT 1
- Docs links in README are invalid HOT 3
- WebAuthn Roaming and Platform support HOT 1
- Please support custom text for a specific prompt and language HOT 1
- Support `upstream_params` option for connections HOT 1
- no examples HOT 1
- Can not remove all clients from a connection HOT 1
- Not all errors returned from management implements management.Error interface HOT 2
- Breaking changes made in dot releases? HOT 1
- Unexpected 'context canceled' errors from multiple usages of the management struct HOT 1
- Ticket.ChangePassword doesn't return the response HOT 3
- Ticket missing field ClientId for ChangePassword and VerifyEmail HOT 2
- Every request returns a 401 http response with `Invalid token` HOT 1
- Sdk itself handles request for Management Api Rate Limiting HOT 1
- THIS REPOSITORY HAS MOVED
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auth0.