(ctx context.Context, pid string, aid string)
| 487 | } |
| 488 | |
| 489 | func (i *imlAuthorizationModule) Info(ctx context.Context, pid string, aid string) (*application_authorization_dto.Authorization, error) { |
| 490 | _, err := i.serviceService.Get(ctx, pid) |
| 491 | if err != nil { |
| 492 | return nil, err |
| 493 | } |
| 494 | auth, err := i.authorizationService.Get(ctx, aid) |
| 495 | if err != nil { |
| 496 | return nil, err |
| 497 | } |
| 498 | var cfg map[string]interface{} |
| 499 | if auth.Config != "" { |
| 500 | _ = json.Unmarshal([]byte(auth.Config), &cfg) |
| 501 | } |
| 502 | |
| 503 | return &application_authorization_dto.Authorization{ |
| 504 | UUID: auth.UUID, |
| 505 | Name: auth.Name, |
| 506 | Driver: auth.Type, |
| 507 | Position: auth.Position, |
| 508 | TokenName: auth.TokenName, |
| 509 | ExpireTime: auth.ExpireTime, |
| 510 | HideCredential: auth.HideCredential, |
| 511 | Config: cfg, |
| 512 | }, nil |
| 513 | } |
no test coverage detected