Skip to content

Commit

Permalink
docs: Improve some docs and update SDK (#135)
Browse files Browse the repository at this point in the history
Signed-off-by: arekkas <[email protected]>
  • Loading branch information
aeneasr authored Nov 11, 2018
1 parent b3718ce commit 9a6901d
Show file tree
Hide file tree
Showing 104 changed files with 973 additions and 5,180 deletions.
232 changes: 1 addition & 231 deletions docs/api.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,134 +380,6 @@
}
},
"definitions": {
"AuthenticationOAuth2ClientCredentialsRequest": {
"type": "object",
"properties": {
"id": {
"description": "Token is the token to introspect.",
"type": "string",
"x-go-name": "ClientID"
},
"scope": {
"description": "Scope is an array of scopes that are required.",
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Scopes"
},
"secret": {
"type": "string",
"x-go-name": "ClientSecret"
}
},
"x-go-package": "github.com/ory/oathkeeper/vendor/github.com/ory/keto/authentication"
},
"AuthenticationOAuth2IntrospectionRequest": {
"type": "object",
"properties": {
"scope": {
"description": "Scope is an array of scopes that are required.",
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Scope"
},
"token": {
"description": "Token is the token to introspect.",
"type": "string",
"x-go-name": "Token"
}
},
"x-go-package": "github.com/ory/oathkeeper/vendor/github.com/ory/keto/authentication"
},
"Authenticator": {
"type": "object",
"x-go-package": "github.com/ory/oathkeeper/vendor/github.com/ory/keto/authentication"
},
"IntrospectionResponse": {
"type": "object",
"properties": {
"active": {
"type": "boolean",
"x-go-name": "Active"
},
"aud": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Audience"
},
"client_id": {
"type": "string",
"x-go-name": "ClientID"
},
"exp": {
"type": "integer",
"format": "int64",
"x-go-name": "ExpiresAt"
},
"ext": {
"description": "Session represents arbitrary session data.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"x-go-name": "Extra"
},
"iat": {
"type": "integer",
"format": "int64",
"x-go-name": "IssuedAt"
},
"iss": {
"type": "string",
"x-go-name": "Issuer"
},
"nbf": {
"type": "integer",
"format": "int64",
"x-go-name": "NotBefore"
},
"scope": {
"type": "string",
"x-go-name": "Scope"
},
"sub": {
"description": "Here, it's sub",
"type": "string",
"x-go-name": "Subject"
},
"token_type": {
"type": "string",
"x-go-name": "TokenType"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-package": "github.com/ory/oathkeeper/vendor/github.com/ory/keto/authentication"
},
"OAuth2ClientCredentialsAuthentication": {
"type": "object",
"x-go-package": "github.com/ory/oathkeeper/vendor/github.com/ory/keto/authentication"
},
"OAuth2IntrospectionAuthentication": {
"type": "object",
"x-go-package": "github.com/ory/oathkeeper/vendor/github.com/ory/keto/authentication"
},
"Session": {
"type": "object",
"properties": {
"GetSubject": {
"type": "string"
}
},
"x-go-package": "github.com/ory/oathkeeper/vendor/github.com/ory/keto/authentication"
},
"Upstream": {
"type": "object",
"properties": {
Expand All @@ -529,108 +401,6 @@
},
"x-go-package": "github.com/ory/oathkeeper/rule"
},
"authenticationDefaultSession": {
"type": "object",
"properties": {
"allowed": {
"description": "Allowed is true if the request is allowed and false otherwise.",
"type": "boolean",
"x-go-name": "Allowed"
},
"sub": {
"description": "Subject is the identity that authorized issuing the token, for example a user or an OAuth2 app.\nThis is usually a uuid but you can choose a urn or some other id too.",
"type": "string",
"x-go-name": "Subject"
}
},
"x-go-name": "DefaultSession",
"x-go-package": "github.com/ory/oathkeeper/vendor/github.com/ory/keto/authentication"
},
"authenticationOAuth2ClientCredentialsSession": {
"type": "object",
"properties": {
"allowed": {
"description": "Allowed is true if the request is allowed and false otherwise.",
"type": "boolean",
"x-go-name": "Allowed"
},
"sub": {
"description": "Subject is the identity that authorized issuing the token, for example a user or an OAuth2 app.\nThis is usually a uuid but you can choose a urn or some other id too.",
"type": "string",
"x-go-name": "Subject"
}
},
"x-go-name": "OAuth2ClientCredentialsSession",
"x-go-package": "github.com/ory/oathkeeper/vendor/github.com/ory/keto/authentication"
},
"authenticationOAuth2Session": {
"type": "object",
"properties": {
"allowed": {
"description": "Allowed is true if the request is allowed and false otherwise.",
"type": "boolean",
"x-go-name": "Allowed"
},
"aud": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Audience"
},
"client_id": {
"description": "ClientID is the id of the OAuth2 client that requested the token.",
"type": "string",
"x-go-name": "ClientID"
},
"exp": {
"description": "ExpiresAt is the expiry timestamp.",
"type": "string",
"format": "date-time",
"x-go-name": "ExpiresAt"
},
"iat": {
"description": "IssuedAt is the token creation time stamp.",
"type": "string",
"format": "date-time",
"x-go-name": "IssuedAt"
},
"iss": {
"description": "Issuer is the id of the issuer, typically an hydra instance.",
"type": "string",
"x-go-name": "Issuer"
},
"nbf": {
"type": "string",
"format": "date-time",
"x-go-name": "NotBefore"
},
"scope": {
"description": "GrantedScopes is a list of scopes that the subject authorized when asked for consent.",
"type": "string",
"x-go-name": "GrantedScopes"
},
"session": {
"description": "Session represents arbitrary session data.",
"type": "object",
"additionalProperties": {
"type": "object"
},
"x-go-name": "Extra"
},
"sub": {
"description": "Subject is the identity that authorized issuing the token, for example a user or an OAuth2 app.\nThis is usually a uuid but you can choose a urn or some other id too.",
"type": "string",
"x-go-name": "Subject"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-name": "OAuth2Session",
"x-go-package": "github.com/ory/oathkeeper/vendor/github.com/ory/keto/authentication"
},
"healthNotReadyStatus": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -823,7 +593,7 @@
"x-go-name": "Methods"
},
"url": {
"description": "This field represents the URL pattern this rule matches. When ORY Oathkeeper searches for rules\nto decide what to do with an incoming request to the proxy server, it compares the full request URL\n(e.g. https://mydomain.com/api/resource) without query parameters of the incoming\nrequest with this field. If a match is found, the rule is considered a partial match.\nIf the matchesMethods field is satisfied as well, the rule is considered a full match.\n\nYou can use regular expressions in this field to match more than one url. Regular expressions are encapsulated in\nbrackets \u003c and \u003e. The following example matches all paths of the domain `mydomain.com`: `https://mydomain.com/\u003c.*\u003e`.\n\nFor more information refer to: https://ory.gitbooks.io/oathkeeper/content/concepts.html#rules",
"description": "This field represents the URL pattern this rule matches. When ORY Oathkeeper searches for rules\nto decide what to do with an incoming request to the proxy server, it compares the full request URL\n(e.g. https://mydomain.com/api/resource) without query parameters of the incoming\nrequest with this field. If a match is found, the rule is considered a partial match.\nIf the matchesMethods field is satisfied as well, the rule is considered a full match.\n\nYou can use regular expressions in this field to match more than one url. Regular expressions are encapsulated in\nbrackets \u003c and \u003e. The following example matches all paths of the domain `mydomain.com`: `https://mydomain.com/\u003c.*\u003e`.",
"type": "string",
"x-go-name": "URL"
}
Expand Down
10 changes: 0 additions & 10 deletions proxy/authorizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,3 @@ type Authorizer interface {
Authorize(r *http.Request, session *AuthenticationSession, config json.RawMessage, rl *rule.Rule) error
GetID() string
}

// This field will be used to decide advanced authorization requests where access control policies are used. A
// action is typically something a user wants to do (e.g. write, read, delete).
// This field supports expansion as described in the developer guide: https://ory.gitbooks.io/oathkeeper/content/concepts.html#rules
//RequiredAction string `json:"requiredAction"`

// This field will be used to decide advanced authorization requests where access control policies are used. A
// resource is typically something a user wants to access (e.g. printer, article, virtual machine).
// This field supports expansion as described in the developer guide: https://ory.gitbooks.io/oathkeeper/content/concepts.html#rules
//RequiredResource string `json:"requiredResource"`
4 changes: 1 addition & 3 deletions rule/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// has no rule applied, the proxy server will return a 404 not found error.
//
// ORY Oathkeeper stores as many rules as required and iterates through them on every request. Rules are essential
// to the way ORY Oathkeeper works. To read more on rules, please refer to the developer guide: https://ory.gitbooks.io/oathkeeper/content/concepts.html#rules
// to the way ORY Oathkeeper works.
package rule

// A rule
Expand Down Expand Up @@ -93,8 +93,6 @@ type swaggerRuleMatch struct {
//
// You can use regular expressions in this field to match more than one url. Regular expressions are encapsulated in
// brackets < and >. The following example matches all paths of the domain `mydomain.com`: `https://mydomain.com/<.*>`.
//
// For more information refer to: https://ory.gitbooks.io/oathkeeper/content/concepts.html#rules
URL string `json:"url"`
}

Expand Down
2 changes: 0 additions & 2 deletions rule/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ type RuleMatch struct {
//
// You can use regular expressions in this field to match more than one url. Regular expressions are encapsulated in
// brackets < and >. The following example matches all paths of the domain `mydomain.com`: `https://mydomain.com/<.*>`.
//
// For more information refer to: https://ory.gitbooks.io/oathkeeper/content/concepts.html#rules
URL string `json:"url" db:"url"`

compiledURL *regexp.Regexp
Expand Down
10 changes: 0 additions & 10 deletions sdk/go/oathkeeper/swagger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,14 @@ Class | Method | HTTP request | Description

## Documentation For Models

- [AuthenticationDefaultSession](docs/AuthenticationDefaultSession.md)
- [AuthenticationOAuth2ClientCredentialsRequest](docs/AuthenticationOAuth2ClientCredentialsRequest.md)
- [AuthenticationOAuth2ClientCredentialsSession](docs/AuthenticationOAuth2ClientCredentialsSession.md)
- [AuthenticationOAuth2IntrospectionRequest](docs/AuthenticationOAuth2IntrospectionRequest.md)
- [AuthenticationOAuth2Session](docs/AuthenticationOAuth2Session.md)
- [Authenticator](docs/Authenticator.md)
- [HealthNotReadyStatus](docs/HealthNotReadyStatus.md)
- [HealthStatus](docs/HealthStatus.md)
- [InlineResponse401](docs/InlineResponse401.md)
- [IntrospectionResponse](docs/IntrospectionResponse.md)
- [JsonWebKey](docs/JsonWebKey.md)
- [JsonWebKeySet](docs/JsonWebKeySet.md)
- [OAuth2ClientCredentialsAuthentication](docs/OAuth2ClientCredentialsAuthentication.md)
- [OAuth2IntrospectionAuthentication](docs/OAuth2IntrospectionAuthentication.md)
- [Rule](docs/Rule.md)
- [RuleHandler](docs/RuleHandler.md)
- [RuleMatch](docs/RuleMatch.md)
- [Session](docs/Session.md)
- [SwaggerCreateRuleParameters](docs/SwaggerCreateRuleParameters.md)
- [SwaggerGetRuleParameters](docs/SwaggerGetRuleParameters.md)
- [SwaggerListRulesParameters](docs/SwaggerListRulesParameters.md)
Expand Down
20 changes: 0 additions & 20 deletions sdk/go/oathkeeper/swagger/authentication_default_session.go

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 9a6901d

Please sign in to comment.