Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
DA-4596: update for affiliation package for auth0 jwks cache changeS
Browse files Browse the repository at this point in the history
Signed-off-by: Ajinkya Nahar <[email protected]>
  • Loading branch information
Ajinkya Nahar authored and ajinkyan83 committed Dec 21, 2021
1 parent e9b850e commit e645c34
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions affiliation/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type SlackProvider interface {

// Auth0ClientProvider ...
type Auth0ClientProvider interface {
GetToken(validateTokenRequired bool) (string, error)
GetToken() (string, error)
}

// Affiliation struct
Expand Down Expand Up @@ -81,7 +81,7 @@ func (a *Affiliation) AddIdentity(identity *Identity) bool {
log.Println("AddIdentity: Identity is nil")
return false
}
token, err := a.auth0ClientProvider.GetToken(true)
token, err := a.auth0ClientProvider.GetToken()
if err != nil {
log.Println(err)
}
Expand Down Expand Up @@ -128,7 +128,7 @@ func (a *Affiliation) GetIdentity(uuid string) *Identity {
log.Println("GetIdentity: uuid is empty")
return nil
}
token, err := a.auth0ClientProvider.GetToken(true)
token, err := a.auth0ClientProvider.GetToken()
if err != nil {
log.Println(err)
}
Expand Down Expand Up @@ -156,7 +156,7 @@ func (a *Affiliation) GetOrganizations(uuid, projectSlug string) *[]Enrollment {
if uuid == "" || projectSlug == "" {
return nil
}
token, err := a.auth0ClientProvider.GetToken(true)
token, err := a.auth0ClientProvider.GetToken()
if err != nil {
log.Println(err)
}
Expand Down Expand Up @@ -201,7 +201,7 @@ func (a *Affiliation) GetProfile(uuid, projectSlug string) *ProfileResponse {
if uuid == "" || projectSlug == "" {
return nil
}
token, err := a.auth0ClientProvider.GetToken(true)
token, err := a.auth0ClientProvider.GetToken()
if err != nil {
log.Println(err)
}
Expand Down Expand Up @@ -231,7 +231,7 @@ func (a *Affiliation) GetIdentityByUser(key string, value string) (*AffIdentity,
nilKeyOrValueErr := "GetIdentityByUser: key or value is null"
return nil, fmt.Errorf(nilKeyOrValueErr)
}
token, err := a.auth0ClientProvider.GetToken(true)
token, err := a.auth0ClientProvider.GetToken()
if err != nil {
log.Println(err)
return nil, err
Expand Down Expand Up @@ -341,7 +341,7 @@ func (a *Affiliation) GetProfileByUsername(username string, projectSlug string)
return nil, fmt.Errorf(nilKeyOrValueErr)
}

token, err := a.auth0ClientProvider.GetToken(false)
token, err := a.auth0ClientProvider.GetToken()
if err != nil {
log.Println(err)
return nil, err
Expand Down

0 comments on commit e645c34

Please sign in to comment.