Skip to content

Commit

Permalink
groups: Corrects group scope documentation (#710)
Browse files Browse the repository at this point in the history
Closes #702
  • Loading branch information
arekkas authored Dec 14, 2017
1 parent be54a75 commit a58624c
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 19 deletions.
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
// scopes:
// hydra.clients: "A scope required to manage OAuth 2.0 Clients"
// hydra.policies: "A scope required to manage access control policies"
// hydra.groups: "A scope required to manage warden groups"
// hydra.warden: "A scope required to make access control inquiries"
// hydra.warden.groups: "A scope required to manage warden groups"
// hydra.keys.get: "A scope required to fetch JSON Web Keys"
// hydra.keys.create: "A scope required to create JSON Web Keys"
// hydra.keys.delete: "A scope required to delete JSON Web Keys"
Expand Down
22 changes: 14 additions & 8 deletions docs/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@
"security": [
{
"oauth2": [
"hydra.groups"
"hydra.warden.groups"
]
}
],
Expand Down Expand Up @@ -1576,7 +1576,7 @@
"security": [
{
"oauth2": [
"hydra.groups"
"hydra.warden.groups"
]
}
],
Expand Down Expand Up @@ -1626,7 +1626,7 @@
"security": [
{
"oauth2": [
"hydra.groups"
"hydra.warden.groups"
]
}
],
Expand Down Expand Up @@ -1675,7 +1675,7 @@
"security": [
{
"oauth2": [
"hydra.groups"
"hydra.warden.groups"
]
}
],
Expand Down Expand Up @@ -1726,7 +1726,7 @@
"security": [
{
"oauth2": [
"hydra.groups"
"hydra.warden.groups"
]
}
],
Expand Down Expand Up @@ -1782,7 +1782,7 @@
"security": [
{
"oauth2": [
"hydra.groups"
"hydra.warden.groups"
]
}
],
Expand Down Expand Up @@ -1963,6 +1963,12 @@
"Handler": {
"type": "object",
"properties": {
"Generators": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/KeyGenerator"
}
},
"H": {
"$ref": "#/definitions/Writer"
},
Expand All @@ -1976,7 +1982,7 @@
"$ref": "#/definitions/Firewall"
}
},
"x-go-package": "github.com/ory/hydra/warden/group"
"x-go-package": "github.com/ory/hydra/jwk"
},
"KeyGenerator": {
"type": "object",
Expand Down Expand Up @@ -3355,14 +3361,14 @@
"scopes": {
"hydra.clients": "A scope required to manage OAuth 2.0 Clients",
"hydra.consent": "A scope required to fetch and modify consent requests",
"hydra.groups": "A scope required to manage warden groups",
"hydra.health": "A scope required to get health information",
"hydra.keys.create": "A scope required to create JSON Web Keys",
"hydra.keys.delete": "A scope required to delete JSON Web Keys",
"hydra.keys.get": "A scope required to fetch JSON Web Keys",
"hydra.keys.update": "A scope required to get JSON Web Keys",
"hydra.policies": "A scope required to manage access control policies",
"hydra.warden": "A scope required to make access control inquiries",
"hydra.warden.groups": "A scope required to manage warden groups",
"offline": "A scope required when requesting refresh tokens",
"openid": "Request an OpenID Connect ID Token"
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/go/hydra/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ Class | Method | HTTP request | Description
- **Scopes**:
- **hydra.clients**: A scope required to manage OAuth 2.0 Clients
- **hydra.consent**: A scope required to fetch and modify consent requests
- **hydra.groups**: A scope required to manage warden groups
- **hydra.health**: A scope required to get health information
- **hydra.keys.create**: A scope required to create JSON Web Keys
- **hydra.keys.delete**: A scope required to delete JSON Web Keys
- **hydra.keys.get**: A scope required to fetch JSON Web Keys
- **hydra.keys.update**: A scope required to get JSON Web Keys
- **hydra.policies**: A scope required to manage access control policies
- **hydra.warden**: A scope required to make access control inquiries
- **hydra.warden.groups**: A scope required to manage warden groups
- **offline**: A scope required when requesting refresh tokens
- **openid**: Request an OpenID Connect ID Token

Expand Down
1 change: 1 addition & 0 deletions sdk/go/hydra/swagger/docs/Handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Generators** | [**map[string]KeyGenerator**](KeyGenerator.md) | | [optional] [default to null]
**H** | [**Writer**](Writer.md) | | [optional] [default to null]
**Manager** | [**Manager**](Manager.md) | | [optional] [default to null]
**ResourcePrefix** | **string** | | [optional] [default to null]
Expand Down
2 changes: 2 additions & 0 deletions sdk/go/hydra/swagger/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
package swagger

type Handler struct {
Generators map[string]KeyGenerator `json:"Generators,omitempty"`

H Writer `json:"H,omitempty"`

Manager Manager `json:"Manager,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion sdk/js/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,14 @@ Class | Method | HTTP request | Description
- **Scopes**:
- hydra.clients: A scope required to manage OAuth 2.0 Clients
- hydra.consent: A scope required to fetch and modify consent requests
- hydra.groups: A scope required to manage warden groups
- hydra.health: A scope required to get health information
- hydra.keys.create: A scope required to create JSON Web Keys
- hydra.keys.delete: A scope required to delete JSON Web Keys
- hydra.keys.get: A scope required to fetch JSON Web Keys
- hydra.keys.update: A scope required to get JSON Web Keys
- hydra.policies: A scope required to manage access control policies
- hydra.warden: A scope required to make access control inquiries
- hydra.warden.groups: A scope required to manage warden groups
- offline: A scope required when requesting refresh tokens
- openid: Request an OpenID Connect ID Token

1 change: 1 addition & 0 deletions sdk/js/swagger/docs/Handler.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**generators** | [**{String: KeyGenerator}**](KeyGenerator.md) | | [optional]
**H** | [**Writer**](Writer.md) | | [optional]
**manager** | [**Manager**](Manager.md) | | [optional]
**resourcePrefix** | **String** | | [optional]
Expand Down
21 changes: 19 additions & 2 deletions sdk/js/swagger/src/model/Handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,21 @@
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(
['ApiClient', 'model/Firewall', 'model/Manager', 'model/Writer'],
[
'ApiClient',
'model/Firewall',
'model/KeyGenerator',
'model/Manager',
'model/Writer'
],
factory
)
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(
require('../ApiClient'),
require('./Firewall'),
require('./KeyGenerator'),
require('./Manager'),
require('./Writer')
)
Expand All @@ -37,11 +44,12 @@
root.HydraOAuth2OpenIdConnectServer.Handler = factory(
root.HydraOAuth2OpenIdConnectServer.ApiClient,
root.HydraOAuth2OpenIdConnectServer.Firewall,
root.HydraOAuth2OpenIdConnectServer.KeyGenerator,
root.HydraOAuth2OpenIdConnectServer.Manager,
root.HydraOAuth2OpenIdConnectServer.Writer
)
}
})(this, function(ApiClient, Firewall, Manager, Writer) {
})(this, function(ApiClient, Firewall, KeyGenerator, Manager, Writer) {
'use strict'

/**
Expand Down Expand Up @@ -70,6 +78,11 @@
if (data) {
obj = obj || new exports()

if (data.hasOwnProperty('Generators')) {
obj['Generators'] = ApiClient.convertToType(data['Generators'], {
String: KeyGenerator
})
}
if (data.hasOwnProperty('H')) {
obj['H'] = Writer.constructFromObject(data['H'])
}
Expand All @@ -89,6 +102,10 @@
return obj
}

/**
* @member {Object.<String, module:model/KeyGenerator>} Generators
*/
exports.prototype['Generators'] = undefined
/**
* @member {module:model/Writer} H
*/
Expand Down
12 changes: 6 additions & 6 deletions warden/group/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (h *Handler) SetRoutes(r *httprouter.Router) {
// Schemes: http, https
//
// Security:
// oauth2: hydra.groups
// oauth2: hydra.warden.groups
//
// Responses:
// 200: findGroupsByMemberResponse
Expand Down Expand Up @@ -143,7 +143,7 @@ func (h *Handler) FindGroupNames(w http.ResponseWriter, r *http.Request, _ httpr
// Schemes: http, https
//
// Security:
// oauth2: hydra.groups
// oauth2: hydra.warden.groups
//
// Responses:
// 201: groupResponse
Expand Down Expand Up @@ -198,7 +198,7 @@ func (h *Handler) CreateGroup(w http.ResponseWriter, r *http.Request, _ httprout
// Schemes: http, https
//
// Security:
// oauth2: hydra.groups
// oauth2: hydra.warden.groups
//
// Responses:
// 201: groupResponse
Expand Down Expand Up @@ -249,7 +249,7 @@ func (h *Handler) GetGroup(w http.ResponseWriter, r *http.Request, ps httprouter
// Schemes: http, https
//
// Security:
// oauth2: hydra.groups
// oauth2: hydra.warden.groups
//
// Responses:
// 204: emptyResponse
Expand Down Expand Up @@ -299,7 +299,7 @@ func (h *Handler) DeleteGroup(w http.ResponseWriter, r *http.Request, ps httprou
// Schemes: http, https
//
// Security:
// oauth2: hydra.groups
// oauth2: hydra.warden.groups
//
// Responses:
// 204: emptyResponse
Expand Down Expand Up @@ -355,7 +355,7 @@ func (h *Handler) AddGroupMembers(w http.ResponseWriter, r *http.Request, ps htt
// Schemes: http, https
//
// Security:
// oauth2: hydra.groups
// oauth2: hydra.warden.groups
//
// Responses:
// 204: emptyResponse
Expand Down

0 comments on commit a58624c

Please sign in to comment.