Documentation ¶
Index ¶
- type ClientIDDoc
- type Server
- func (s *Server) Address() string
- func (s *Server) AuthStartURL() string
- func (s *Server) HealthCheck(w http.ResponseWriter, r *http.Request)
- func (s *Server) NotFoundHandler(w http.ResponseWriter, r *http.Request)
- func (s *Server) StartAndBlock() error
- func (s *Server) TokenSource() oauth2.TokenSource
- type SolidOIDCHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientIDDoc ¶
type ClientIDDoc struct { Context []string `json:"@context"` ClientID string `json:"client_id"` ClientName string `json:"client_name"` RedirectURIs []string `json:"redirect_uris"` PostLogoutRedirectURIs []string `json:"post_logout_redirect_uris"` ClientURI string `json:"client_uri"` LogoURI string `json:"logo_uri"` TosURI string `json:"tos_uri"` Scope string `json:"scope"` GrantTypes []string `json:"grant_types"` ResponseTypes []string `json:"response_types"` DefaultMaxAge int `json:"default_max_age"` RequireAuthTime bool `json:"require_auth_time"` }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server creates a server to be used as part of client registration in the solid-oidc protocol. As discussed in https://solid.github.io/solid-oidc/#clientids the client identifies itself to the OIDC provider by presenting a URL
func (*Server) AuthStartURL ¶
AuthStartURL returns the URL to kickoff the oauth login flow.
func (*Server) HealthCheck ¶
func (s *Server) HealthCheck(w http.ResponseWriter, r *http.Request)
func (*Server) NotFoundHandler ¶
func (s *Server) NotFoundHandler(w http.ResponseWriter, r *http.Request)
func (*Server) StartAndBlock ¶
StartAndBlock starts the server and blocks.
func (*Server) TokenSource ¶
func (s *Server) TokenSource() oauth2.TokenSource
type SolidOIDCHelper ¶
SolidOIDCHelper implements the CredentialHelper interface defined in https://github.com/kubeflow/internal-acls/blob/master/google_groups/pkg/gcp/credentials.go#L28
func NewSolidOIDCHelper ¶
func NewSolidOIDCHelper(clientID string, oidcProviderUri string, log logr.Logger) (*SolidOIDCHelper, error)
NewSolidOIDCHelper creates a new instance of the helper to obtain solid OIDC credentaisl. clientID: This should be the URI hosting the client id document describing the application. oidcProviderUri: The URI of the OIDC provider
This will start a server to accept the callbacks that will contain the credentials.
func (*SolidOIDCHelper) GetOAuthConfig ¶
func (h *SolidOIDCHelper) GetOAuthConfig() *oauth2.Config
func (*SolidOIDCHelper) GetTokenSource ¶
func (h *SolidOIDCHelper) GetTokenSource(ctx context.Context) (oauth2.TokenSource, error)
GetTokenSource requests a token from the web, then returns the retrieved token.