style(auth): remove comments and change error

pull/2749/head
Chaim Lev Ari 2019-01-16 17:53:10 +02:00
parent dc067b3308
commit b09f491f62
4 changed files with 2 additions and 3 deletions

View File

@ -26,7 +26,7 @@ type settingsUpdatePayload struct {
func (payload *settingsUpdatePayload) Validate(r *http.Request) error {
if *payload.AuthenticationMethod != 1 && *payload.AuthenticationMethod != 2 && *payload.AuthenticationMethod != 3 {
return portainer.Error("Invalid authentication method value. Value must be one of: 1 (internal) or 2 (LDAP/AD)")
return portainer.Error("Invalid authentication method value. Value must be one of: 1 (internal), 2 (LDAP/AD) or 3 (OAuth)")
}
if payload.LogoURL != nil && *payload.LogoURL != "" && !govalidator.IsURL(*payload.LogoURL) {
return portainer.Error("Invalid logo URL. Must correspond to a valid URL format")

View File

@ -18,7 +18,7 @@ import (
const (
// ErrInvalidCode defines an error raised when the user authorization code is invalid
ErrInvalidCode = portainer.Error("Authorization code is invalid")
ErrInvalidCode = portainer.Error("Invalid OAuth authorization code")
)
// Service represents a service used to authenticate users against an authorization server

View File

@ -3,5 +3,4 @@ angular.module('portainer.extensions.oauth').component('oauthSettings', {
bindings: {
settings: '<'
}
// controller: 'oauthSettingsController'
});