mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add oauth2 token exchange (#12196)
Co-authored-by: Steven Masley <stevenmasley@gmail.com>
This commit is contained in:
@@ -290,6 +290,22 @@ func (l License) RBACObject() rbac.Object {
|
||||
return rbac.ResourceLicense.WithIDString(strconv.FormatInt(int64(l.ID), 10))
|
||||
}
|
||||
|
||||
func (c OAuth2ProviderAppCode) RBACObject() rbac.Object {
|
||||
return rbac.ResourceOAuth2ProviderAppCodeToken.WithOwner(c.UserID.String())
|
||||
}
|
||||
|
||||
func (OAuth2ProviderAppSecret) RBACObject() rbac.Object {
|
||||
return rbac.ResourceOAuth2ProviderAppSecret
|
||||
}
|
||||
|
||||
func (OAuth2ProviderApp) RBACObject() rbac.Object {
|
||||
return rbac.ResourceOAuth2ProviderApp
|
||||
}
|
||||
|
||||
func (a GetOAuth2ProviderAppsByUserIDRow) RBACObject() rbac.Object {
|
||||
return a.OAuth2ProviderApp.RBACObject()
|
||||
}
|
||||
|
||||
type WorkspaceAgentConnectionStatus struct {
|
||||
Status WorkspaceAgentStatus `json:"status"`
|
||||
FirstConnectedAt *time.Time `json:"first_connected_at"`
|
||||
|
||||
Reference in New Issue
Block a user