go-oidc icon indicating copy to clipboard operation
go-oidc copied to clipboard

Logout Token Validation Support?

Open rickwang7712 opened this issue 6 years ago • 6 comments

According to: https://openid.net/specs/openid-connect-backchannel-1_0.html#Validation I think if there is a function like func (v *IDTokenVerifier) Verify for Logout Token Validation would be nice... Or is there already a function that I could call?

rickwang7712 avatar Aug 30 '19 09:08 rickwang7712

This package currently doesn't implement logout token logic. It'd be helpful to know what providers implement this and what real-world use cases look like.

ericchiang avatar Sep 09 '19 19:09 ericchiang

Ory Hydra implements OpenID Connect Back-Channel Logout 1.0 which has logout token logic. For my use case, I follow the back-channel spec to implement remote logout feature(ex. use desktop webportal to logout mobile device).

rickwang7712 avatar Sep 10 '19 01:09 rickwang7712

Sorry, last time I gave an unusual example. I would like to update. backchannel-logout is one of the features which support single-sign-out, the other one is frontchannel-logout. If a browser has multiple RPs login, and after one RP requests logout, the server will emit backchannel-logout api to the rest of the RPs which are related with the authentication session(the cookie which helps achieve single-sign-on).

There are many oidc server implementation supports this feature. For example:

I know google's oidc server hasn't support this feature yet, but this project doesn't restrict its users to google's oidc service only, right?

To solve the logout validation problem I have already had solution based on this project, may I make contribution to here?

rickwang7712 avatar Apr 09 '20 02:04 rickwang7712

Since those specs are still a Draft we'd probably want to wait before adding new APIs to this package.

You should be able to use most of the Verify method to validate a logout token. Then use Claims() to pull out the events and sid claims. Does that satisfy your use case?

ericchiang avatar Apr 20 '20 16:04 ericchiang

@ericchiang now that the spec is final, will the PR be reviewed or considered?

lwj5 avatar Oct 04 '22 19:10 lwj5