From 1754b6ff163568128196e25fdfb8a47bf810e248 Mon Sep 17 00:00:00 2001 From: aeneasr Date: Thu, 5 Oct 2017 12:48:50 +0200 Subject: [PATCH] sdk: revert audience changes --- docs/api.swagger.json | 18 ++++++++++++------ glide.yaml | 2 ++ sdk/go/hydra/swagger/context.go | 4 ++-- sdk/go/hydra/swagger/docs/Context.md | 2 +- sdk/go/hydra/swagger/docs/Handler.md | 1 + .../swagger/docs/OAuth2TokenIntrospection.md | 2 +- .../hydra/swagger/docs/OAuth2consentRequest.md | 2 +- sdk/go/hydra/swagger/handler.go | 2 ++ .../swagger/o_auth2_token_introspection.go | 2 +- sdk/go/hydra/swagger/o_auth2consent_request.go | 2 +- 10 files changed, 24 insertions(+), 13 deletions(-) diff --git a/docs/api.swagger.json b/docs/api.swagger.json index 5297fb01fb..2a43533c2e 100644 --- a/docs/api.swagger.json +++ b/docs/api.swagger.json @@ -1844,10 +1844,10 @@ "description": "Context contains an access token's session data", "type": "object", "properties": { - "cid": { - "description": "ClientID is who the token was issued for. This is an OAuth2 app usually.", + "aud": { + "description": "Audience is who the token was issued for. This is an OAuth2 app usually.", "type": "string", - "x-go-name": "ClientID" + "x-go-name": "Audience" }, "exp": { "description": "ExpiresAt is the expiry timestamp.", @@ -1894,6 +1894,12 @@ "Handler": { "type": "object", "properties": { + "Generators": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/KeyGenerator" + } + }, "H": { "$ref": "#/definitions/Writer" }, @@ -1904,7 +1910,7 @@ "$ref": "#/definitions/Firewall" } }, - "x-go-package": "github.com/ory/hydra/warden/group" + "x-go-package": "github.com/ory/hydra/jwk" }, "KeyGenerator": { "type": "object", @@ -2248,7 +2254,7 @@ "x-go-name": "Active" }, "aud": { - "description": "ClientID is a service-specific string identifier or list of string\nidentifiers representing the intended audience for this token.", + "description": "Audience is a service-specific string identifier or list of string\nidentifiers representing the intended audience for this token.", "type": "string", "x-go-name": "Audience" }, @@ -2312,7 +2318,7 @@ "title": "ConsentRequest represents a consent request.", "properties": { "audience": { - "description": "ClientID is the audience this token is meant for. Usually a URL.", + "description": "Audience is the client id that initiated the OAuth2 request.", "type": "string", "x-go-name": "Audience" }, diff --git a/glide.yaml b/glide.yaml index 3f41a9413a..2744db083a 100644 --- a/glide.yaml +++ b/glide.yaml @@ -26,6 +26,8 @@ import: - package: github.com/moul/http2curl - package: github.com/oleiade/reflections version: 1.0.0 +- package: github.com/go-resty/resty + version: 1.0.0 - package: github.com/ory/fosite version: 0.11.3 subpackages: diff --git a/sdk/go/hydra/swagger/context.go b/sdk/go/hydra/swagger/context.go index 5801d0d184..8d8a31b836 100644 --- a/sdk/go/hydra/swagger/context.go +++ b/sdk/go/hydra/swagger/context.go @@ -13,8 +13,8 @@ package swagger // Context contains an access token's session data type Context struct { - // ClientID is who the token was issued for. This is an OAuth2 app usually. - Cid string `json:"cid,omitempty"` + // Audience is who the token was issued for. This is an OAuth2 app usually. + Aud string `json:"aud,omitempty"` // Extra represents arbitrary session data. Ext map[string]interface{} `json:"ext,omitempty"` diff --git a/sdk/go/hydra/swagger/docs/Context.md b/sdk/go/hydra/swagger/docs/Context.md index cf21c1a95a..4328f833c9 100644 --- a/sdk/go/hydra/swagger/docs/Context.md +++ b/sdk/go/hydra/swagger/docs/Context.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Cid** | **string** | ClientID is who the token was issued for. This is an OAuth2 app usually. | [optional] [default to null] +**Aud** | **string** | Audience is who the token was issued for. This is an OAuth2 app usually. | [optional] [default to null] **Ext** | [**map[string]interface{}**](interface{}.md) | Extra represents arbitrary session data. | [optional] [default to null] **Iss** | **string** | Issuer is the id of the issuer, typically an hydra instance. | [optional] [default to null] **Scopes** | **[]string** | GrantedScopes is a list of scopes that the subject authorized when asked for consent. | [optional] [default to null] diff --git a/sdk/go/hydra/swagger/docs/Handler.md b/sdk/go/hydra/swagger/docs/Handler.md index f6f2dc3c0a..77f018750e 100644 --- a/sdk/go/hydra/swagger/docs/Handler.md +++ b/sdk/go/hydra/swagger/docs/Handler.md @@ -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] **W** | [**Firewall**](Firewall.md) | | [optional] [default to null] diff --git a/sdk/go/hydra/swagger/docs/OAuth2TokenIntrospection.md b/sdk/go/hydra/swagger/docs/OAuth2TokenIntrospection.md index f3d7ca092a..e8c90f78f2 100644 --- a/sdk/go/hydra/swagger/docs/OAuth2TokenIntrospection.md +++ b/sdk/go/hydra/swagger/docs/OAuth2TokenIntrospection.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Active** | **bool** | Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time). | [optional] [default to null] -**Aud** | **string** | ClientID is a service-specific string identifier or list of string identifiers representing the intended audience for this token. | [optional] [default to null] +**Aud** | **string** | Audience is a service-specific string identifier or list of string identifiers representing the intended audience for this token. | [optional] [default to null] **ClientId** | **string** | ClientID is aclient identifier for the OAuth 2.0 client that requested this token. | [optional] [default to null] **Exp** | **int64** | Expires at is an integer timestamp, measured in the number of seconds since January 1 1970 UTC, indicating when this token will expire. | [optional] [default to null] **Ext** | [**map[string]interface{}**](interface{}.md) | Extra is arbitrary data set by the session. | [optional] [default to null] diff --git a/sdk/go/hydra/swagger/docs/OAuth2consentRequest.md b/sdk/go/hydra/swagger/docs/OAuth2consentRequest.md index 5a88a96979..a123d7919b 100644 --- a/sdk/go/hydra/swagger/docs/OAuth2consentRequest.md +++ b/sdk/go/hydra/swagger/docs/OAuth2consentRequest.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Audience** | **string** | ClientID is the audience this token is meant for. Usually a URL. | [optional] [default to null] +**Audience** | **string** | Audience is the client id that initiated the OAuth2 request. | [optional] [default to null] **Id** | **string** | ID is the id of this consent request. | [optional] [default to null] **RedirectUrl** | **string** | Redirect URL is the URL where the user agent should be redirected to after the consent has been accepted or rejected. | [optional] [default to null] **RequestedScopes** | **[]string** | RequestedScopes represents a list of scopes that have been requested by the OAuth2 request initiator. | [optional] [default to null] diff --git a/sdk/go/hydra/swagger/handler.go b/sdk/go/hydra/swagger/handler.go index 83f0c0d784..14c0e7786a 100644 --- a/sdk/go/hydra/swagger/handler.go +++ b/sdk/go/hydra/swagger/handler.go @@ -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"` diff --git a/sdk/go/hydra/swagger/o_auth2_token_introspection.go b/sdk/go/hydra/swagger/o_auth2_token_introspection.go index a89cadebfb..0eddb5fba8 100644 --- a/sdk/go/hydra/swagger/o_auth2_token_introspection.go +++ b/sdk/go/hydra/swagger/o_auth2_token_introspection.go @@ -15,7 +15,7 @@ type OAuth2TokenIntrospection struct { // Active is a boolean indicator of whether or not the presented token is currently active. The specifics of a token's \"active\" state will vary depending on the implementation of the authorization server and the information it keeps about its tokens, but a \"true\" value return for the \"active\" property will generally indicate that a given token has been issued by this authorization server, has not been revoked by the resource owner, and is within its given time window of validity (e.g., after its issuance time and before its expiration time). Active bool `json:"active,omitempty"` - // ClientID is a service-specific string identifier or list of string identifiers representing the intended audience for this token. + // Audience is a service-specific string identifier or list of string identifiers representing the intended audience for this token. Aud string `json:"aud,omitempty"` // ClientID is aclient identifier for the OAuth 2.0 client that requested this token. diff --git a/sdk/go/hydra/swagger/o_auth2consent_request.go b/sdk/go/hydra/swagger/o_auth2consent_request.go index 4c705b098d..531348d319 100644 --- a/sdk/go/hydra/swagger/o_auth2consent_request.go +++ b/sdk/go/hydra/swagger/o_auth2consent_request.go @@ -12,7 +12,7 @@ package swagger type OAuth2consentRequest struct { - // ClientID is the audience this token is meant for. Usually a URL. + // Audience is the client id that initiated the OAuth2 request. Audience string `json:"audience,omitempty"` // ID is the id of this consent request.