Add api for identity provider login (#5534)
* add api for ldap login * update ldap login to identity provider login for more flexible login type Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> * update PasswordAuthenticate Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> * add test case Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> * update api path Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> * make goimports and add annotations Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> * update func names & add annotations Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> --------- Signed-off-by: wenhaozhou <wenhaozhou@yunify.com>
This commit is contained in:
@@ -336,7 +336,7 @@ type LoginRecord struct {
|
||||
}
|
||||
|
||||
type LoginRecordSpec struct {
|
||||
// Which authentication method used, BasicAuth/OAuth
|
||||
// Which authentication method used, Password/OAuth/Token
|
||||
Type LoginType `json:"type"`
|
||||
// Provider of authentication, Ldap/Github etc.
|
||||
Provider string `json:"provider"`
|
||||
@@ -353,9 +353,9 @@ type LoginRecordSpec struct {
|
||||
type LoginType string
|
||||
|
||||
const (
|
||||
BasicAuth LoginType = "Basic"
|
||||
OAuth LoginType = "OAuth"
|
||||
Token LoginType = "Token"
|
||||
Password LoginType = "Password"
|
||||
OAuth LoginType = "OAuth"
|
||||
Token LoginType = "Token"
|
||||
)
|
||||
|
||||
// +kubebuilder:object:root=true
|
||||
|
||||
Reference in New Issue
Block a user