Code Monkey home page Code Monkey logo

Comments (11)

ericchiang avatar ericchiang commented on August 19, 2024

It'd be great if you could provide some more information about what you're trying to do:

  • What is the application you're attempting to use go-oidc against?
  • What point in the flow does your key?
  • Do you have a reproducible program that demonstrates this?

from go-oidc.

aphuang2013 avatar aphuang2013 commented on August 19, 2024

below is the code excerpt. I'm just the example app (example/app/main.go) with pingFederate backend (it supports discovery protocol). the API that I have issue is ExchangeAuthCode in client.go
it seems the client code support these two and my provider list those two, but it error out in my case.

AuthMethodClientSecretPost = "client_secret_post"
AuthMethodClientSecretBasic = "client_secret_basic"

this is reproducible but since my setup is internal, I won't able to show it to you.

    fs := flag.NewFlagSet("go-oidc-app", flag.ExitOnError)
    listen := fs.String("listen", defaultListenHost, "serve traffic on this address (<host>:<port>)")

    redirectURL := fs.String("redirect-url", fmt.Sprintf("https://%s%s", defaultListenHost, pathCallback), "")
    clientID := fs.String("client-id","go_oidc_client","")
    clientSecret := fs.String("client-secret","some_secret_ddd", "")
    discovery := fs.String("discovery", "https://c4t22724.itcs.hpecorp.net:9031", "")

from go-oidc.

ericchiang avatar ericchiang commented on August 19, 2024

@aphuang2013 Did you mean to close this? It's perfectly fine if your setup is internal

from go-oidc.

aphuang2013 avatar aphuang2013 commented on August 19, 2024

sorry, I closed it inadvertently. I think my confusion related the authMethod support may be is the key

from go-oidc.

aphuang2013 avatar aphuang2013 commented on August 19, 2024

Is there way I can debug this further?

from go-oidc.

ericchiang avatar ericchiang commented on August 19, 2024

Sorry, I still need to get access to a pingFederate server to do testing.

from go-oidc.

ericchiang avatar ericchiang commented on August 19, 2024

Have you used golang.org/x/oauth2? Does that package give a similar error?

from go-oidc.

aphuang2013 avatar aphuang2013 commented on August 19, 2024

the oidc package already has a sample app with callback setup, I was hoping
to debug the code exchange section. the x/oauth2 does not have a sample
app, so I need to write a full app in order to try it.

On Mon, May 16, 2016 at 8:18 AM, Eric Chiang [email protected]
wrote:

Have you used golang.org/x/oauth2? Does that package give a similar error?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/coreos/go-oidc/issues/82#issuecomment-219452844

peter huang

from go-oidc.

ericchiang avatar ericchiang commented on August 19, 2024

try this one: https://github.com/ericchiang/oidc/blob/master/examples/idtoken/app.go

from go-oidc.

aphuang2013 avatar aphuang2013 commented on August 19, 2024

thanks for the help, I was able to get id token now. I added the TLS
listener to your sample code so it will do proper cert stuff.

{
"OAuth2Token": {
"access_token": "REDACTED",
"token_type": "Bearer",
"refresh_token": "kJM7YKzg1cqwwjTwNveexN9ZopiOZRp99EYTznSv1i",
"expiry": "2016-05-17T07:32:45.317839882Z"
},
"IDTokenClaims": {
"sub": "[email protected]",
"email": "[email protected]",
"aud": "go_oidc_client",
"jti": "2G1eKneAl6ddKzI7vB6EfF",
"iss": "https://c4t22724.itcs.hpecorp.net:9031",
"iat": 1463463166,
"exp": 1463463466,
"acr": "urn:oasis:names:tc:SAML:2.0:ac:classes:TLSClient"
}
}

On Mon, May 16, 2016 at 9:13 PM, Eric Chiang [email protected]
wrote:

try this one:
https://github.com/ericchiang/oidc/blob/master/examples/idtoken/app.go


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/coreos/go-oidc/issues/82#issuecomment-219615055

peter huang

from go-oidc.

ericchiang avatar ericchiang commented on August 19, 2024

The fork where this was fixed has now been upstreamed #110

from go-oidc.

Related Issues (20)

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.