Skip to content

Commit

Permalink
sdk: revert audience changes
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr authored and arekkas committed Oct 5, 2017
1 parent c007c78 commit 1754b6f
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 13 deletions.
18 changes: 12 additions & 6 deletions docs/api.swagger.json
Expand Up @@ -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.",
Expand Down Expand Up @@ -1894,6 +1894,12 @@
"Handler": {
"type": "object",
"properties": {
"Generators": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/KeyGenerator"
}
},
"H": {
"$ref": "#/definitions/Writer"
},
Expand All @@ -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",
Expand Down Expand Up @@ -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"
},
Expand Down Expand Up @@ -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"
},
Expand Down
2 changes: 2 additions & 0 deletions glide.yaml
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions sdk/go/hydra/swagger/context.go
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion sdk/go/hydra/swagger/docs/Context.md
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions sdk/go/hydra/swagger/docs/Handler.md
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]
**W** | [**Firewall**](Firewall.md) | | [optional] [default to null]
Expand Down
2 changes: 1 addition & 1 deletion sdk/go/hydra/swagger/docs/OAuth2TokenIntrospection.md
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion sdk/go/hydra/swagger/docs/OAuth2consentRequest.md
Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions sdk/go/hydra/swagger/handler.go
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/go/hydra/swagger/o_auth2_token_introspection.go
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion sdk/go/hydra/swagger/o_auth2consent_request.go
Expand Up @@ -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.
Expand Down

0 comments on commit 1754b6f

Please sign in to comment.