Code Monkey home page Code Monkey logo

go-lanai's People

Contributors

andybowu avatar bseto avatar chrholme avatar lelia avatar newmodelcoder avatar pdcisco avatar rihou avatar stephan543 avatar stonedu1011 avatar sumangat avatar timshi avatar xinzlu-cisco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

go-lanai's Issues

httpclient errors contain messages with unformatted %v verb

Description

Errors returned by some httpclient methods, e.g. WithBaseUrl contain strings with the raw, uninterpolated %v verb. It appears that ErrMsg is being set with a string is never actually formatted - the string format specified here is not processed as intended:

return nil, NewNoEndpointFoundError("cannot create client with base URL: %v", e)

Expected Behavior

String representation of error should not contain %v

Actual Behavior

E.g. when calling WithBaseUrl with an empty string, the error string is cannot create client with base URL: %v

Screenshot 2024-04-15 at 8 40 19 AM

Affected Version

v0.13.1-0.20240330193930-c61e79fc6004

Steps to Reproduce

Call WithBaseUrl using an empty string. Other methods like WithService may be impacted similarly.

Checklist

[OAuth2] Scopes approval decision should be saved in session.

Problem Statement

When used as OAuth2 authorization/authentication server, if client doesn't have auto-approved scopes configured, the user is asked to approve the requested scope every time when client initiate the "authorize" process. The decision is not saved even in the same session.

Proposed Solution

User's approval decision should be cached in session.

Alternatives Considered

Currently the only alternative is to configure "auto-approval" for the client, which might not be desirable for certain use cases

Additional Context

Relavent implementation is in pkg/security/oauth2/auth/authorize/middleware.go

Test Filing a Bug

Description

Please provide a description of the problem.

Expected Behavior

Please describe what you expected would happen.

Actual Behavior

Please describe what happened instead.

Affected Version

Please provide the version number where this issue was encountered.

Steps to Reproduce

  1. First step
  2. Second step
  3. etc.

Checklist

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.