code: func (ssa *SQLStorageAuthority) GetAuthorization(ctx context.Context, id string) (core.Authorization, error) {
  	authz := core.Authorization{}
  	tx, err := ssa.dbMap.Begin()
  	if err != nil {
  		return authz, err
  	}
  	txWithCtx := tx.WithContext(ctx)
  
  	pa, err := selectPendingAuthz(txWithCtx, "WHERE id = ?", id)
  	if err != nil && err != sql.ErrNoRows {
  		return authz, Rollback(tx, err)
  	}
  	if err == sql.ErrNoRows {
  		var fa authzModel
  		err := txWithCtx.SelectOne(&fa, fmt.Sprintf("SELECT %s FROM authz WHERE id = ?", authzFields), id)
  		if err != nil && err != sql.ErrNoRows {
  			return authz, Rollback(tx, err)
  		} else if err == sql.ErrNoRows {
  			// If there was no result in either the pending authz table or the authz
  			// table then return a `berrors.NotFound` instance (or a rollback error if
  			// the transaction rollback fails)
  			return authz, Rollback(
  				tx,
  				berrors.NotFoundError("no authorization found with id %q", id))
  		}
  		authz = fa.Authorization
  	} else {
  		authz = pa.Authorization
  	}
  
  	authz.Challenges, err = ssa.getChallenges(txWithCtx, authz.ID)
  	if err != nil {
  		return authz, Rollback(tx, err)
  	}
  
  	return authz, tx.Commit()
  }
docs: // GetAuthorization obtains an Authorization by ID