Documentation ¶
Index ¶
- type Server
- func (s Server) APIProxy() http.Handler
- func (s Server) AddCodeAuthentication(next http.Handler, w http.ResponseWriter, r *http.Request)
- func (s Server) AddJWTAuthentication(next http.Handler, w http.ResponseWriter, r *http.Request)
- func (s Server) AuthMiddleware(next http.Handler) http.Handler
- func (s Server) GetRequestAuthCode(w http.ResponseWriter, r *http.Request) (string, error)
- func (s Server) GetRequestToken(w http.ResponseWriter, r *http.Request) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { APIPath string BaseAddress string APIServerURL string APITransport *http.Transport BearerToken string JWTTokenRSAKey *rsa.PublicKey OAuthServer *oauth.OAuth }
Server holds information required for serving files.
func (Server) AddCodeAuthentication ¶
AddCodeAuthentication adds the bearer authentication header to the http request and proxy it to the api server using OAuth2 server token
func (Server) AddJWTAuthentication ¶
AddJWTAuthentication adds the bearer authentication header to the http request and proxy it to the api server using JWT authentication
func (Server) AuthMiddleware ¶
AuthMiddleware will look for a seesion cookie and use it as a Bearer token.
func (Server) GetRequestAuthCode ¶
GetRequestAuthCode parses a request and get the token to pass to k8s API
func (Server) GetRequestToken ¶
GetRequestToken parses a request and get the token to pass to k8s API
Click to show internal directories.
Click to hide internal directories.