Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultFormRenderer = grantTemplateRenderer{}
DefaultFormRenderer displays a page prompting the user to approve an OAuth grant. The requesting client id, requested scopes, and redirect URI are displayed to the user.
Functions ¶
This section is empty.
Types ¶
type Form ¶
type Form struct { Action string Error string ServiceAccountName string ServiceAccountNamespace string GrantedScopes interface{} Names GrantFormFields Values GrantFormFields }
type FormRenderer ¶
type FormRenderer interface {
Render(form Form, w http.ResponseWriter, req *http.Request)
}
FormRenderer is responsible for rendering a Form to prompt the user to approve or reject a requested OAuth scope grant.
type Grant ¶
type Grant struct {
// contains filtered or unexported fields
}
func NewGrant ¶
func NewGrant(csrf csrf.CSRF, auth authenticator.Request, render FormRenderer, clientregistry oauthclient.Getter, authregistry oauthclientauthorization.Registry) *Grant
type GrantFormFields ¶ added in v1.3.0
type Mux ¶
type Mux interface { Handle(pattern string, handler http.Handler) HandleFunc(pattern string, handler func(http.ResponseWriter, *http.Request)) }
Mux is an object that can register http handlers.
type Scope ¶ added in v1.3.0
type Scope struct { // Name is the string included in the OAuth scope parameter Name string // Description is a human-readable description of the scope. May be empty. Description string // Warning is a human-readable warning about the scope. Typically used to scare the user about escalating permissions. May be empty. Warning string // Error is a human-readable error, typically around the validity of the scope. May be empty. Error string // Granted indicates whether the user has already granted this scope. Granted bool }
Click to show internal directories.
Click to hide internal directories.