token-validator: display user associated domain and delegation
This commit is contained in:
parent
d28b14fa50
commit
8427a0adb8
4 changed files with 30 additions and 16 deletions
|
|
@ -11,11 +11,19 @@ const (
|
|||
)
|
||||
|
||||
func (student Student) MyDelegatedDomain() string {
|
||||
return fmt.Sprintf("%s.%s", strings.Trim(strings.Replace(student.Login, "_", "-", -1), "-_"), DelegatedDomainSuffix)
|
||||
if student.DelegatedDomain != nil {
|
||||
return *student.DelegatedDomain
|
||||
} else {
|
||||
return fmt.Sprintf("%s.%s", strings.Trim(strings.Replace(student.Login, "_", "-", -1), "-_"), DelegatedDomainSuffix)
|
||||
}
|
||||
}
|
||||
|
||||
func (student Student) MyAssociatedDomain() string {
|
||||
return fmt.Sprintf("%s.%s", strings.Trim(strings.Replace(student.Login, "_", "-", -1), "-_"), AssociatedDomainSuffix)
|
||||
if student.AssociatedDomain != nil {
|
||||
return *student.AssociatedDomain
|
||||
} else {
|
||||
return fmt.Sprintf("%s.%s", strings.Trim(strings.Replace(student.Login, "_", "-", -1), "-_"), AssociatedDomainSuffix)
|
||||
}
|
||||
}
|
||||
|
||||
func (student Student) GetAssociatedDomains() (ds []string) {
|
||||
|
|
|
|||
Reference in a new issue