code.gitea.io/gitea@v1.21.7/services/auth/source/oauth2/source_name.go (about)

     1  // Copyright 2021 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package oauth2
     5  
     6  // Name returns the provider name of this source
     7  func (source *Source) Name() string {
     8  	return source.Provider
     9  }
    10  
    11  // DisplayName returns the display name of this source
    12  func (source *Source) DisplayName() string {
    13  	provider, has := gothProviders[source.Provider]
    14  	if !has {
    15  		return source.Provider
    16  	}
    17  	return provider.DisplayName()
    18  }