mirror of
https://github.com/wahyd4/loginsrv.git
synced 2026-08-09 04:46:29 +10:00
Merge pull request #13 from magikstm/master
Fixed some typos in error messages and comments
This commit is contained in:
+2
-2
@@ -40,7 +40,7 @@ func setup(c *caddy.Controller) error {
|
||||
}
|
||||
|
||||
if len(args) == 1 {
|
||||
logging.Logger.Warnf("DEPRECATED: Please set the loing path by parameter login_path and not as directive argument (%v:%v)", c.File(), c.Line())
|
||||
logging.Logger.Warnf("DEPRECATED: Please set the login path by parameter login_path and not as directive argument (%v:%v)", c.File(), c.Line())
|
||||
config.LoginPath = path.Join(args[0], "/login")
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ func parseConfig(c *caddy.Controller) (*login.Config, error) {
|
||||
cfg.ConfigureFlagSet(fs)
|
||||
|
||||
for c.NextBlock() {
|
||||
// caddy preferes '_' in parameter names,
|
||||
// caddy prefers '_' in parameter names,
|
||||
// so we map them to the '-' from the command line flags
|
||||
// the replacement supports both, for backwards compatibility
|
||||
name := strings.Replace(c.Val(), "_", "-", -1)
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ type Backend struct {
|
||||
auth *Auth
|
||||
}
|
||||
|
||||
// NewBackend creates a new Backend and verifies the parameters.
|
||||
// NewBackend creates a new Backend and verifies the parameters.
|
||||
func NewBackend(filename string) (*Backend, error) {
|
||||
auth, err := NewAuth(filename)
|
||||
return &Backend{
|
||||
|
||||
+2
-2
@@ -95,14 +95,14 @@ func (c *Config) ConfigureFlagSet(f *flag.FlagSet) {
|
||||
|
||||
// the -backends is deprecated, but we support it for backwards compatibility
|
||||
deprecatedBackends := setFunc(func(optsKvList string) error {
|
||||
logging.Logger.Warn("DEPRECATED: '-backend' is no loger supported. Please set the backends by explicit paramters")
|
||||
logging.Logger.Warn("DEPRECATED: '-backend' is no longer supported. Please set the backends by explicit parameters")
|
||||
opts, err := parseOptions(optsKvList)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
pName, ok := opts["provider"]
|
||||
if !ok {
|
||||
return errors.New("missing provder name provider=..")
|
||||
return errors.New("missing provider name provider=...")
|
||||
}
|
||||
delete(opts, "provider")
|
||||
c.Backends[pName] = opts
|
||||
|
||||
@@ -4,6 +4,6 @@ type ProviderDescription struct {
|
||||
// the name of the provider
|
||||
Name string
|
||||
|
||||
// the text for the commandline optio
|
||||
// the text for the commandline option
|
||||
HelpText string
|
||||
}
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ func NewClient(endpoint string, clientId string, clientSecret string) *Client {
|
||||
}
|
||||
|
||||
// Do an Osiam authorisation by Resource Owner Password Credentials Grant.
|
||||
// If no scopes are supplied, the default scope ist 'me'.
|
||||
// If no scopes are supplied, the default scope is 'me'.
|
||||
func (c *Client) GetTokenByPassword(username, password string, scopes ...string) (authenticated bool, token *Token, err error) {
|
||||
scopeList := strings.Join(scopes, ",")
|
||||
if scopeList == "" {
|
||||
|
||||
Reference in New Issue
Block a user