implement RFC 8628: Device authorization grant

WIP

Related #264
This commit is contained in:
Tim Möhlmann 2023-02-22 20:11:42 +01:00
parent 8e298791d7
commit 671b13b9c6
15 changed files with 693 additions and 16 deletions

20
pkg/client/rp/device.go Normal file
View file

@ -0,0 +1,20 @@
package rp
import (
"github.com/zitadel/oidc/v2/pkg/client"
"github.com/zitadel/oidc/v2/pkg/oidc"
)
func DeviceAuthorization(clientID string, scopes []string, rp RelyingParty) (*oidc.DeviceAuthorizationResponse, error) {
req := &oidc.DeviceAuthorizationRequest{
Scopes: scopes,
ClientID: clientID,
}
return client.CallDeviceAuthorizationEndpoint(req, rp)
}
/*
func DeviceAccessToken() (*oauth2.Token, error) {
req := &oidc.DeviceAccessTokenRequest{}
}
*/