Below is my kubeconfig file for accessing kubernetes clusters:
kind: ClientConfig
apiVersion: authentication.gke.io/v2alpha1
spec:
  name: dev-corp
  server: https://10.x.x.x:443
  certificateAuthorityData: ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  authentication:
  - name: oidc
    oidc:
      clientID: aaaaad3-9aa1-33c8-dd0-ddddd6b5bf5
      clientSecret: ccccccccccccccccc-
      issuerURI: https://login.microsoftonline.com/aaaa92-aab7-bbfa-cccf-ddaaaaaaaa/v2.0
      kubectlRedirectURI: http://localhost:12345/callback
      cloudConsoleRedirectURI: http://console.cloud.google.com/kubernetes/oidc
      scopes: offline_access,profile
      userClaim: upn
      userPrefix: '-'
      groupsClaim: groups
  preferredAuthentication: oidc
There are different OAuth grant types.
My understanding is, above OAuth grant type is client credential grant type, that requires client_id, client_secret, token URL(issuerURI), scope
- What is the significance of fields - kubectlRedirectURI,- cloudConsoleRedirectURI,- userClaim,- userPrefix?
- How OIDC different from OAuth2? 
- oauth2.Configdoes not store- userClaim&- userPrefix,- groupsClaiminformation , as shown here.... https://github.com/golang/oauth2/blob/master/oauth2.go#L41- How to store - kind:ClientConfigwith oidc based authentication into cache? for example- api.Configcan be stored with an API from client-go to write- api.Configas shown here.
 
    