mirror of
https://github.com/minio/minio.git
synced 2025-11-28 13:09:09 -05:00
Have simpler JWT authentication. (#3501)
This commit is contained in:
@@ -72,3 +72,15 @@ type credential struct {
|
||||
func newCredential() credential {
|
||||
return credential{mustGetAccessKey(), mustGetSecretKey()}
|
||||
}
|
||||
|
||||
func getCredential(accessKey, secretKey string) (credential, error) {
|
||||
if !isAccessKeyValid(accessKey) {
|
||||
return credential{}, errInvalidAccessKeyLength
|
||||
}
|
||||
|
||||
if !isSecretKeyValid(secretKey) {
|
||||
return credential{}, errInvalidSecretKeyLength
|
||||
}
|
||||
|
||||
return credential{accessKey, secretKey}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user