Documentation ¶
Index ¶
- Constants
- Variables
- func DetectScheme(addr string) string
- func EnsureScheme(addr string, scheme string) string
- func SecretDataGetString(secret *api.Secret, key string, defaults ...string) string
- func SecretDataSetString(secret *api.Secret, key string, value string)
- type Client
- func (c *Client) CheckPendingLogin(token string) (interface{}, error)
- func (c *Client) LoginWithJWTAndClaims(ctx context.Context, jwt string, claimedRoles []v1.RoleWithClaim) (*api.Secret, error)
- func (c *Client) PrepareServerAddr(server string) string
- func (c *Client) RefreshJWT(ctx context.Context, jwt string) (string, error)
- type RedirectSaverClient
Constants ¶
View Source
const ( DefaultLoginEndpoint = "/v1/auth/flant/login" ObtainJWTURL = "/v1/auth/flant/issue/multipass_jwt/" )
Variables ¶
View Source
var DefaultScheme = "https"
Functions ¶
func DetectScheme ¶
func EnsureScheme ¶
func SecretDataGetString ¶
Types ¶
type Client ¶
func (*Client) CheckPendingLogin ¶
func (*Client) LoginWithJWTAndClaims ¶
func (c *Client) LoginWithJWTAndClaims(ctx context.Context, jwt string, claimedRoles []v1.RoleWithClaim) (*api.Secret, error)
LoginWithJWT use JWT to auth in Vault and get session token.
Also it follows redirects and return last used server in Data map of api.Secret object.
func (*Client) PrepareServerAddr ¶
PrepareServerAddr adds schema to a server address.
type RedirectSaverClient ¶
func NewRedirectSaverClient ¶
func NewRedirectSaverClient(cfg *api.Config) (*RedirectSaverClient, error)
func (*RedirectSaverClient) GetTargetServer ¶
func (c *RedirectSaverClient) GetTargetServer() string
Click to show internal directories.
Click to hide internal directories.