mirror of https://github.com/portainer/portainer
				
				
				
			style(auth): remove comments and change error
							parent
							
								
									dc067b3308
								
							
						
					
					
						commit
						b09f491f62
					
				| 
						 | 
				
			
			@ -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")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,5 +3,4 @@ angular.module('portainer.extensions.oauth').component('oauthSettings', {
 | 
			
		|||
  bindings: {
 | 
			
		||||
    settings: '<'
 | 
			
		||||
  }
 | 
			
		||||
  // controller: 'oauthSettingsController'
 | 
			
		||||
});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue