github.com/blend/go-sdk@v1.20220411.3/oauth/profile.go (about)

     1  /*
     2  
     3  Copyright (c) 2022 - Present. Blend Labs, Inc. All rights reserved
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file.
     5  
     6  */
     7  
     8  package oauth
     9  
    10  // Profile is a profile with google.
    11  type Profile struct {
    12  	ID            string `json:"id"`
    13  	Email         string `json:"email"`
    14  	VerifiedEmail bool   `json:"verified_email"`
    15  	Name          string `json:"name"`
    16  	GivenName     string `json:"given_name"`
    17  	FamilyName    string `json:"family_name"`
    18  	Link          string `json:"link"`
    19  	Gender        string `json:"gender"`
    20  	Locale        string `json:"locale"`
    21  	PictureURL    string `json:"picture"`
    22  }
    23  
    24  // Username returns the <username>@fqdn component
    25  // of the email address.
    26  func (p Profile) Username() string {
    27  	return p.Email
    28  }