Documentation ¶
Overview ¶
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2015 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func CloseContext(key string, val interface{})
- func CreateSignupLink(hostPort string, token string) string
- func EncodeCookie(user, sid string) (string, error)
- func ErrorPageLink(message string) string
- func SSHAgentLogin(proxyAddr, user, password, hotpToken string, pubKey []byte, ttl time.Duration) (cert []byte, err error)
- type AuthHandler
- type Context
- type Cookie
- type LocalAuth
- func (s *LocalAuth) Auth(user, pass string, hotpToken string) (string, error)
- func (s *LocalAuth) ClearSession(w http.ResponseWriter)
- func (s *LocalAuth) GetCertificate(c SSHLoginCredentials) ([]byte, error)
- func (s *LocalAuth) GetHost() string
- func (s *LocalAuth) NewUserFinish(token, password, hotpToken string) error
- func (s *LocalAuth) NewUserForm(token string) (user string, QRImg []byte, hotpFirstValues []string, e error)
- func (s *LocalAuth) SetSession(w http.ResponseWriter, user, sid string) error
- func (s *LocalAuth) ValidateSession(user, sid string) (Context, error)
- type LocalContext
- func (c *LocalContext) Close() error
- func (c *LocalContext) ConnectUpstream(addr string) (*sshutils.Upstream, error)
- func (c *LocalContext) GetAuthMethods() ([]ssh.AuthMethod, error)
- func (c *LocalContext) GetClient() auth.ClientI
- func (c *LocalContext) GetUser() string
- func (c *LocalContext) GetWebSID() string
- type MultiSiteConfig
- type MultiSiteHandler
- type NavSection
- type RequestHandler
- type SSHLoginCredentials
- type Server
- type SiteHandler
- type SiteHandlerConfig
- type TunAuth
- type TunContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseContext ¶
func CloseContext(key string, val interface{})
func CreateSignupLink ¶
func EncodeCookie ¶
func ErrorPageLink ¶
Types ¶
type AuthHandler ¶
type AuthHandler interface { GetHost() string Auth(user, pass string, hotpToken string) (string, error) GetCertificate(c SSHLoginCredentials) ([]byte, error) NewUserForm(token string) (user string, QRImg []byte, hotpFirstValues []string, e error) NewUserFinish(token, password, hotpToken string) error ValidateSession(user, sid string) (Context, error) SetSession(w http.ResponseWriter, user, sid string) error ClearSession(w http.ResponseWriter) }
type Cookie ¶
func DecodeCookie ¶
type LocalAuth ¶
type LocalAuth struct {
// contains filtered or unexported fields
}
func (*LocalAuth) ClearSession ¶
func (s *LocalAuth) ClearSession(w http.ResponseWriter)
func (*LocalAuth) GetCertificate ¶
func (s *LocalAuth) GetCertificate(c SSHLoginCredentials) ([]byte, error)
func (*LocalAuth) NewUserFinish ¶
func (*LocalAuth) NewUserForm ¶
func (*LocalAuth) SetSession ¶
func (s *LocalAuth) SetSession(w http.ResponseWriter, user, sid string) error
type LocalContext ¶
type LocalContext struct {
// contains filtered or unexported fields
}
func (*LocalContext) Close ¶
func (c *LocalContext) Close() error
func (*LocalContext) ConnectUpstream ¶
func (c *LocalContext) ConnectUpstream(addr string) (*sshutils.Upstream, error)
func (*LocalContext) GetAuthMethods ¶
func (c *LocalContext) GetAuthMethods() ([]ssh.AuthMethod, error)
func (*LocalContext) GetClient ¶
func (c *LocalContext) GetClient() auth.ClientI
func (*LocalContext) GetUser ¶
func (c *LocalContext) GetUser() string
func (*LocalContext) GetWebSID ¶
func (c *LocalContext) GetWebSID() string
type MultiSiteConfig ¶
type MultiSiteHandler ¶
type MultiSiteHandler struct { httprouter.Router sync.Mutex // contains filtered or unexported fields }
func NewMultiSiteHandler ¶
func NewMultiSiteHandler(cfg MultiSiteConfig) (*MultiSiteHandler, error)
func (*MultiSiteHandler) String ¶
func (h *MultiSiteHandler) String() string
type NavSection ¶
type NavSection struct {}
type RequestHandler ¶
type RequestHandler func(http.ResponseWriter, *http.Request, httprouter.Params, Context)
type SSHLoginCredentials ¶
type SiteHandler ¶
type SiteHandler struct { httprouter.Router sync.Mutex // contains filtered or unexported fields }
SiteHandler implements methods for single site
func NewSiteHandler ¶
func NewSiteHandler(cfg SiteHandlerConfig) *SiteHandler
func (*SiteHandler) Path ¶
func (s *SiteHandler) Path(params ...string) string
type SiteHandlerConfig ¶
type SiteHandlerConfig struct { Auth AuthHandler AssetsDir string URLPrefix string }
type TunAuth ¶
type TunAuth struct { AuthHandler // contains filtered or unexported fields }
func NewTunAuth ¶
func NewTunAuth(auth AuthHandler, srv reversetunnel.Server, siteName string) (*TunAuth, error)
type TunContext ¶
type TunContext struct { Context // contains filtered or unexported fields }
func (*TunContext) ConnectUpstream ¶
func (c *TunContext) ConnectUpstream(addr string) (*sshutils.Upstream, error)
func (*TunContext) GetClient ¶
func (c *TunContext) GetClient() auth.ClientI